- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- IAM Permissions
- DestinationDataset
- DestinationDatasetReference
- Try it!
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.
HTTP request
POST https://analyticshub.googleapis.com/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
name |
Required. Resource name of the listing that you want to subscribe to. e.g. |
Request body
The request body contains data with the following structure:
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field destination . Resulting destination of the listing that you subscribed to. destination can be only one of the following: |
|
destinationDataset |
BigQuery destination dataset to create for the subscriber. |
Response body
If successful, the response body is empty.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/bigquery
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
IAM Permissions
Requires the following IAM permission on the name
resource:
analyticshub.listings.subscribe
For more information, see the IAM documentation.
DestinationDataset
Defines the destination bigquery dataset.
JSON representation |
---|
{
"datasetReference": {
object ( |
Fields | |
---|---|
datasetReference |
Required. A reference that identifies the destination dataset. |
friendlyName |
Optional. A descriptive name for the dataset. |
description |
Optional. A user-friendly description of the dataset. |
labels |
Optional. The labels associated with this dataset. You can use these to organize and group your datasets. You can set this property when inserting or updating a dataset. See https://cloud.google.com/resource-manager/docs/creating-managing-labels for more information. An object containing a list of |
location |
Required. The geographic location where the dataset should reside. See https://cloud.google.com/bigquery/docs/locations for supported locations. |
DestinationDatasetReference
Contains the reference that identifies a destination bigquery dataset.
JSON representation |
---|
{ "datasetId": string, "projectId": string } |
Fields | |
---|---|
datasetId |
Required. A unique ID for this dataset, without the project name. The ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). The maximum length is 1,024 characters. |
projectId |
Required. The ID of the project containing this dataset. |