listings
Creates, updates, deletes, gets or lists a listings
resource.
Overview
Name | listings |
Type | Resource |
Id | google.analyticshub.listings |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the listing. e.g. projects/myproject/locations/US/dataExchanges/123/listings/456 |
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. |
bigqueryDataset | object | A reference to a shared dataset. It is an existing BigQuery dataset with a collection of objects such as tables and views that you want to share with subscribers. When subscriber's subscribe to a listing, Analytics Hub creates a linked dataset in the subscriber's project. A Linked dataset is an opaque, read-only BigQuery dataset that serves as a symbolic link to a shared dataset. |
categories | array | Optional. Categories of the listing. Up to two categories are allowed. |
dataProvider | object | Contains details of the data provider. |
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 | 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. |
primaryContact | string | Optional. Email or URL of the primary point of contact of the listing. Max Length: 1000 bytes. |
publisher | object | Contains details of the listing publisher. |
pubsubTopic | object | Pub/Sub topic source. |
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 | Restricted export config, used to configure restricted export on linked dataset. |
state | string | Output only. Current state of the listing. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
projects_locations_data_exchanges_listings_get | SELECT | dataExchangesId, listingsId, locationsId, projectsId | Gets the details of a listing. |
projects_locations_data_exchanges_listings_list | SELECT | dataExchangesId, locationsId, projectsId | Lists all listings in a given project and location. |
projects_locations_data_exchanges_listings_create | INSERT | dataExchangesId, locationsId, projectsId | Creates a new listing. |
projects_locations_data_exchanges_listings_delete | DELETE | dataExchangesId, listingsId, locationsId, projectsId | Deletes a listing. |
projects_locations_data_exchanges_listings_patch | UPDATE | dataExchangesId, listingsId, locationsId, projectsId | Updates an existing listing. |
projects_locations_data_exchanges_listings_subscribe | EXEC | dataExchangesId, listingsId, locationsId, projectsId | 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. |
SELECT
examples
Lists all listings in a given project and location.
SELECT
name,
description,
bigqueryDataset,
categories,
dataProvider,
discoveryType,
displayName,
documentation,
icon,
primaryContact,
publisher,
pubsubTopic,
requestAccess,
resourceType,
restrictedExportConfig,
state
FROM google.analyticshub.listings
WHERE dataExchangesId = '{{ dataExchangesId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new listings
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.analyticshub.listings (
dataExchangesId,
locationsId,
projectsId,
bigqueryDataset,
pubsubTopic,
displayName,
description,
primaryContact,
documentation,
icon,
dataProvider,
categories,
publisher,
requestAccess,
restrictedExportConfig,
discoveryType
)
SELECT
'{{ dataExchangesId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ bigqueryDataset }}',
'{{ pubsubTopic }}',
'{{ displayName }}',
'{{ description }}',
'{{ primaryContact }}',
'{{ documentation }}',
'{{ icon }}',
'{{ dataProvider }}',
'{{ categories }}',
'{{ publisher }}',
'{{ requestAccess }}',
'{{ restrictedExportConfig }}',
'{{ discoveryType }}'
;
- name: your_resource_model_name
props:
- name: bigqueryDataset
value:
- name: dataset
value: string
- name: selectedResources
value:
- - name: table
value: string
- name: restrictedExportPolicy
value:
- name: enabled
value: boolean
- name: restrictDirectTableAccess
value: boolean
- name: restrictQueryResult
value: boolean
- name: pubsubTopic
value:
- name: topic
value: string
- name: dataAffinityRegions
value:
- string
- name: name
value: string
- name: displayName
value: string
- name: description
value: string
- name: primaryContact
value: string
- name: documentation
value: string
- name: state
value: string
- name: icon
value: string
- name: dataProvider
value:
- name: name
value: string
- name: primaryContact
value: string
- name: categories
value:
- string
- name: publisher
value:
- name: name
value: string
- name: primaryContact
value: string
- name: requestAccess
value: string
- name: restrictedExportConfig
value:
- name: enabled
value: boolean
- name: restrictDirectTableAccess
value: boolean
- name: restrictQueryResult
value: boolean
- name: discoveryType
value: string
- name: resourceType
value: string
UPDATE
example
Updates a listings
resource.
/*+ update */
UPDATE google.analyticshub.listings
SET
bigqueryDataset = '{{ bigqueryDataset }}',
pubsubTopic = '{{ pubsubTopic }}',
displayName = '{{ displayName }}',
description = '{{ description }}',
primaryContact = '{{ primaryContact }}',
documentation = '{{ documentation }}',
icon = '{{ icon }}',
dataProvider = '{{ dataProvider }}',
categories = '{{ categories }}',
publisher = '{{ publisher }}',
requestAccess = '{{ requestAccess }}',
restrictedExportConfig = '{{ restrictedExportConfig }}',
discoveryType = '{{ discoveryType }}'
WHERE
dataExchangesId = '{{ dataExchangesId }}'
AND listingsId = '{{ listingsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified listings
resource.
/*+ delete */
DELETE FROM google.analyticshub.listings
WHERE dataExchangesId = '{{ dataExchangesId }}'
AND listingsId = '{{ listingsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';