listings
Creates, updates, deletes, gets or lists a listings
resource.
Overview
Name | listings |
Type | Resource |
Id | google.analyticshub.listings |
Fields
The following fields are returned by SELECT
queries:
- projects_locations_data_exchanges_listings_get
- projects_locations_data_exchanges_listings_list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the listing. e.g. projects/myproject/locations/us/dataExchanges/123/listings/456 |
allowOnlyMetadataSharing | boolean | Optional. If true, the listing is only available to get the resource metadata. Listing is non subscribable. |
bigqueryDataset | object | Shared dataset i.e. BigQuery dataset source. (id: BigQueryDatasetSource) |
categories | array | Optional. Categories of the listing. Up to five categories are allowed. |
commercialInfo | object | Output only. Commercial info contains the information about the commercial data products associated with the listing. (id: GoogleCloudBigqueryAnalyticshubV1ListingCommercialInfo) |
dataProvider | object | Optional. Details of the data provider who owns the source data. (id: DataProvider) |
description | string | Optional. Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes. |
discoveryType | string | Optional. Type of discovery of the listing on the discovery page. |
displayName | string | Required. Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes. |
documentation | string | Optional. Documentation describing the listing. |
icon | string (byte) | Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the contents of the field are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire. |
logLinkedDatasetQueryUserEmail | boolean | Optional. By default, false. If true, the Listing has an email sharing mandate enabled. |
primaryContact | string | Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes. |
publisher | object | Optional. Details of the publisher who owns the listing and who can share the source data. (id: Publisher) |
pubsubTopic | object | Pub/Sub topic source. (id: PubSubTopicSource) |
requestAccess | string | Optional. Email or URL of the request access of the listing. Subscribers can use this reference to request access. Max Length: 1000 bytes. |
resourceType | string | Output only. Listing shared asset type. |
restrictedExportConfig | object | Optional. If set, restricted export configuration will be propagated and enforced on the linked dataset. (id: RestrictedExportConfig) |
state | string | Output only. Current state of the listing. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the listing. e.g. projects/myproject/locations/us/dataExchanges/123/listings/456 |
allowOnlyMetadataSharing | boolean | Optional. If true, the listing is only available to get the resource metadata. Listing is non subscribable. |
bigqueryDataset | object | Shared dataset i.e. BigQuery dataset source. (id: BigQueryDatasetSource) |
categories | array | Optional. Categories of the listing. Up to five categories are allowed. |
commercialInfo | object | Output only. Commercial info contains the information about the commercial data products associated with the listing. (id: GoogleCloudBigqueryAnalyticshubV1ListingCommercialInfo) |
dataProvider | object | Optional. Details of the data provider who owns the source data. (id: DataProvider) |
description | string | Optional. Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes. |
discoveryType | string | Optional. Type of discovery of the listing on the discovery page. |
displayName | string | Required. Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes. |
documentation | string | Optional. Documentation describing the listing. |
icon | string (byte) | Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the contents of the field are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire. |
logLinkedDatasetQueryUserEmail | boolean | Optional. By default, false. If true, the Listing has an email sharing mandate enabled. |
primaryContact | string | Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes. |
publisher | object | Optional. Details of the publisher who owns the listing and who can share the source data. (id: Publisher) |
pubsubTopic | object | Pub/Sub topic source. (id: PubSubTopicSource) |
requestAccess | string | Optional. Email or URL of the request access of the listing. Subscribers can use this reference to request access. Max Length: 1000 bytes. |
resourceType | string | Output only. Listing shared asset type. |
restrictedExportConfig | object | Optional. If set, restricted export configuration will be propagated and enforced on the linked dataset. (id: RestrictedExportConfig) |
state | string | Output only. Current state of the listing. |
Methods
The following methods are available for this resource:
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
dataExchangesId | string | |
listingsId | string | |
locationsId | string | |
projectsId | string | |
deleteCommercial | boolean | |
listingId | string | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- projects_locations_data_exchanges_listings_get
- projects_locations_data_exchanges_listings_list
Gets the details of a listing.
SELECT
name,
allowOnlyMetadataSharing,
bigqueryDataset,
categories,
commercialInfo,
dataProvider,
description,
discoveryType,
displayName,
documentation,
icon,
logLinkedDatasetQueryUserEmail,
primaryContact,
publisher,
pubsubTopic,
requestAccess,
resourceType,
restrictedExportConfig,
state
FROM google.analyticshub.listings
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataExchangesId = '{{ dataExchangesId }}' -- required
AND listingsId = '{{ listingsId }}' -- required;
Lists all listings in a given project and location.
SELECT
name,
allowOnlyMetadataSharing,
bigqueryDataset,
categories,
commercialInfo,
dataProvider,
description,
discoveryType,
displayName,
documentation,
icon,
logLinkedDatasetQueryUserEmail,
primaryContact,
publisher,
pubsubTopic,
requestAccess,
resourceType,
restrictedExportConfig,
state
FROM google.analyticshub.listings
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND dataExchangesId = '{{ dataExchangesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- projects_locations_data_exchanges_listings_create
- Manifest
Creates a new listing.
INSERT INTO google.analyticshub.listings (
data__bigqueryDataset,
data__pubsubTopic,
data__displayName,
data__description,
data__primaryContact,
data__documentation,
data__icon,
data__dataProvider,
data__categories,
data__publisher,
data__requestAccess,
data__restrictedExportConfig,
data__discoveryType,
data__logLinkedDatasetQueryUserEmail,
data__allowOnlyMetadataSharing,
projectsId,
locationsId,
dataExchangesId,
listingId
)
SELECT
'{{ bigqueryDataset }}',
'{{ pubsubTopic }}',
'{{ displayName }}',
'{{ description }}',
'{{ primaryContact }}',
'{{ documentation }}',
'{{ icon }}',
'{{ dataProvider }}',
'{{ categories }}',
'{{ publisher }}',
'{{ requestAccess }}',
'{{ restrictedExportConfig }}',
'{{ discoveryType }}',
{{ logLinkedDatasetQueryUserEmail }},
{{ allowOnlyMetadataSharing }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ dataExchangesId }}',
'{{ listingId }}'
RETURNING
name,
allowOnlyMetadataSharing,
bigqueryDataset,
categories,
commercialInfo,
dataProvider,
description,
discoveryType,
displayName,
documentation,
icon,
logLinkedDatasetQueryUserEmail,
primaryContact,
publisher,
pubsubTopic,
requestAccess,
resourceType,
restrictedExportConfig,
state
;
# Description fields are for documentation purposes
- name: listings
props:
- name: projectsId
value: string
description: Required parameter for the listings resource.
- name: locationsId
value: string
description: Required parameter for the listings resource.
- name: dataExchangesId
value: string
description: Required parameter for the listings resource.
- name: bigqueryDataset
value: object
description: >
Shared dataset i.e. BigQuery dataset source.
- name: pubsubTopic
value: object
description: >
Pub/Sub topic source.
- name: displayName
value: string
description: >
Required. Human-readable display name of the listing. The display name must contain only Unicode letters, numbers (0-9), underscores (_), dashes (-), spaces ( ), ampersands (&) and can't start or end with spaces. Default value is an empty string. Max length: 63 bytes.
- name: description
value: string
description: >
Optional. Short description of the listing. The description must not contain Unicode non-characters and C0 and C1 control codes except tabs (HT), new lines (LF), carriage returns (CR), and page breaks (FF). Default value is an empty string. Max length: 2000 bytes.
- name: primaryContact
value: string
description: >
Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes.
- name: documentation
value: string
description: >
Optional. Documentation describing the listing.
- name: icon
value: string
description: >
Optional. Base64 encoded image representing the listing. Max Size: 3.0MiB Expected image dimensions are 512x512 pixels, however the API only performs validation on size of the encoded data. Note: For byte fields, the contents of the field are base64-encoded (which increases the size of the data by 33-36%) when using JSON on the wire.
- name: dataProvider
value: object
description: >
Optional. Details of the data provider who owns the source data.
- name: categories
value: array
description: >
Optional. Categories of the listing. Up to five categories are allowed.
- name: publisher
value: object
description: >
Optional. Details of the publisher who owns the listing and who can share the source data.
- name: requestAccess
value: string
description: >
Optional. Email or URL of the request access of the listing. Subscribers can use this reference to request access. Max Length: 1000 bytes.
- name: restrictedExportConfig
value: object
description: >
Optional. If set, restricted export configuration will be propagated and enforced on the linked dataset.
- name: discoveryType
value: string
description: >
Optional. Type of discovery of the listing on the discovery page.
valid_values: ['DISCOVERY_TYPE_UNSPECIFIED', 'DISCOVERY_TYPE_PRIVATE', 'DISCOVERY_TYPE_PUBLIC']
- name: logLinkedDatasetQueryUserEmail
value: boolean
description: >
Optional. By default, false. If true, the Listing has an email sharing mandate enabled.
- name: allowOnlyMetadataSharing
value: boolean
description: >
Optional. If true, the listing is only available to get the resource metadata. Listing is non subscribable.
- name: listingId
value: string
UPDATE
examples
- projects_locations_data_exchanges_listings_patch
Updates an existing listing.
UPDATE google.analyticshub.listings
SET
data__bigqueryDataset = '{{ bigqueryDataset }}',
data__pubsubTopic = '{{ pubsubTopic }}',
data__displayName = '{{ displayName }}',
data__description = '{{ description }}',
data__primaryContact = '{{ primaryContact }}',
data__documentation = '{{ documentation }}',
data__icon = '{{ icon }}',
data__dataProvider = '{{ dataProvider }}',
data__categories = '{{ categories }}',
data__publisher = '{{ publisher }}',
data__requestAccess = '{{ requestAccess }}',
data__restrictedExportConfig = '{{ restrictedExportConfig }}',
data__discoveryType = '{{ discoveryType }}',
data__logLinkedDatasetQueryUserEmail = {{ logLinkedDatasetQueryUserEmail }},
data__allowOnlyMetadataSharing = {{ allowOnlyMetadataSharing }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataExchangesId = '{{ dataExchangesId }}' --required
AND listingsId = '{{ listingsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
allowOnlyMetadataSharing,
bigqueryDataset,
categories,
commercialInfo,
dataProvider,
description,
discoveryType,
displayName,
documentation,
icon,
logLinkedDatasetQueryUserEmail,
primaryContact,
publisher,
pubsubTopic,
requestAccess,
resourceType,
restrictedExportConfig,
state;
DELETE
examples
- projects_locations_data_exchanges_listings_delete
Deletes a listing.
DELETE FROM google.analyticshub.listings
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND dataExchangesId = '{{ dataExchangesId }}' --required
AND listingsId = '{{ listingsId }}' --required
AND deleteCommercial = '{{ deleteCommercial }}';
Lifecycle Methods
- projects_locations_data_exchanges_listings_subscribe
Subscribes to a listing. Currently, with Analytics Hub, you can create listings that reference only BigQuery datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked dataset in the subscriber's project.
EXEC google.analyticshub.listings.projects_locations_data_exchanges_listings_subscribe
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@dataExchangesId='{{ dataExchangesId }}' --required,
@listingsId='{{ listingsId }}' --required
@@json=
'{
"destinationDataset": "{{ destinationDataset }}",
"destinationPubsubSubscription": "{{ destinationPubsubSubscription }}"
}';