Derzeit können Sie mit Analytics Hub Einträge erstellen, die nur auf BigQuery-Datasets verweisen. Beim Abo eines Eintrags für ein BigQuery-Dataset erstellt Analytics Hub ein verknüpftes Dataset im Projekt des Abonnenten.
HTTP-Anfrage
POST https://analyticshub.googleapis.com/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe
Erforderlich. Ressourcenname des Eintrags, den Sie abonnieren möchten. z.B. projects/myproject/locations/US/dataExchanges/123/listings/456.
Anfragetext
Der Anfragetext enthält Daten mit folgender Struktur:
JSON-Darstellung
{// Union field destination can be only one of the following:"destinationDataset": {object (DestinationDataset)}// End of list of possible types for union field destination.}
Felder
Union-Feld destination. Daraus resultierendes Ziel des Eintrags, den Sie abonniert haben. Für destination ist nur einer der folgenden Werte zulässig:
Erforderlich. Eine Referenz, die das Ziel-Dataset identifiziert.
friendlyName
string
Optional. Ein aussagekräftiger Name für das Dataset.
description
string
Optional. Eine nutzerfreundliche Beschreibung des Datasets.
labels
map (key: string, value: string)
Optional. Die mit diesem Dataset verknüpften Labels. Damit können Sie Ihre Datasets organisieren und gruppieren. Sie können diese Eigenschaft festlegen, wenn Sie ein Dataset einfügen oder aktualisieren. Weitere Informationen finden Sie unter https://cloud.google.com/resource-manager/docs/creating-managing-labels.
Ein Objekt, das eine Liste von "key": value-Paaren enthält. Beispiel: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Enthält die Referenz, die ein BigQuery-Ziel-Dataset identifiziert.
JSON-Darstellung
{"datasetId": string,"projectId": string}
Felder
datasetId
string
Erforderlich. Eine eindeutige ID für dieses Dataset ohne den Projektnamen. Die ID darf nur Buchstaben (a–z, A–Z), Ziffern (0–9) und Unterstriche (_) enthalten. Die maximale Länge beträgt 1.024 Zeichen.
projectId
string
Erforderlich. Die ID des Projekts, das dieses Dataset enthält.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-05-23 (UTC)."],[[["\u003cp\u003eThis document outlines how to subscribe to a listing within Google Cloud's Analytics Hub, allowing users to access shared BigQuery datasets.\u003c/p\u003e\n"],["\u003cp\u003eThe subscription process involves sending a POST request to a specific URL, defined using gRPC Transcoding syntax, and includes required path parameters such as the listing's resource name.\u003c/p\u003e\n"],["\u003cp\u003eSubscribers can specify either a BigQuery dataset or a Pub/Sub subscription as the destination for the subscribed data, which involves setting parameters for \u003ccode\u003eDestinationDataset\u003c/code\u003e or \u003ccode\u003eDestinationPubSubSubscription\u003c/code\u003e respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe response to a successful subscription request contains a \u003ccode\u003eSubscription\u003c/code\u003e object, detailing the newly created subscription and its configuration.\u003c/p\u003e\n"],["\u003cp\u003eThe subscription setup requires specific OAuth scopes and IAM permissions on the listing resource, specifically \u003ccode\u003eanalyticshub.listings.subscribe\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.dataExchanges.listings.subscribe\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.SubscribeListingResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [DestinationPubSubSubscription](#DestinationPubSubSubscription)\n - [JSON representation](#DestinationPubSubSubscription.SCHEMA_REPRESENTATION)\n- [PubSubSubscription](#PubSubSubscription)\n - [JSON representation](#PubSubSubscription.SCHEMA_REPRESENTATION)\n- [PushConfig](#PushConfig)\n - [JSON representation](#PushConfig.SCHEMA_REPRESENTATION)\n- [OidcToken](#OidcToken)\n - [JSON representation](#OidcToken.SCHEMA_REPRESENTATION)\n- [PubsubWrapper](#PubsubWrapper)\n- [NoWrapper](#NoWrapper)\n - [JSON representation](#NoWrapper.SCHEMA_REPRESENTATION)\n- [BigQueryConfig](#BigQueryConfig)\n - [JSON representation](#BigQueryConfig.SCHEMA_REPRESENTATION)\n- [CloudStorageConfig](#CloudStorageConfig)\n - [JSON representation](#CloudStorageConfig.SCHEMA_REPRESENTATION)\n- [TextConfig](#TextConfig)\n- [AvroConfig](#AvroConfig)\n - [JSON representation](#AvroConfig.SCHEMA_REPRESENTATION)\n- [ExpirationPolicy](#ExpirationPolicy)\n - [JSON representation](#ExpirationPolicy.SCHEMA_REPRESENTATION)\n- [DeadLetterPolicy](#DeadLetterPolicy)\n - [JSON representation](#DeadLetterPolicy.SCHEMA_REPRESENTATION)\n- [RetryPolicy](#RetryPolicy)\n - [JSON representation](#RetryPolicy.SCHEMA_REPRESENTATION)\n- [MessageTransform](#MessageTransform)\n - [JSON representation](#MessageTransform.SCHEMA_REPRESENTATION)\n- [JavaScriptUDF](#JavaScriptUDF)\n - [JSON representation](#JavaScriptUDF.SCHEMA_REPRESENTATION)\n- [Try it!](#try-it)\n\nSubscribes to a listing.\n\nCurrently, 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.\n\n### HTTP request\n\n`POST https://analyticshub.googleapis.com/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nMessage for response when you subscribe to a listing.\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/bigquery`\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp).\n\nDestinationPubSubSubscription\n-----------------------------\n\nDefines the destination Pub/Sub subscription.\n\nPubSubSubscription\n------------------\n\nDefines the destination Pub/Sub subscription. If none of `pushConfig`, `bigqueryConfig`, `cloudStorageConfig`, `pubsubExportConfig`, or `pubsubliteExportConfig` is set, then the subscriber will pull and ack messages using API methods. At most one of these fields may be set.\n\nPushConfig\n----------\n\nConfiguration for a push delivery endpoint.\n\nOidcToken\n---------\n\nContains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect).\n\nPubsubWrapper\n-------------\n\nThis type has no fields.\nThe payload to the push endpoint is in the form of the JSON representation of a PubsubMessage (\u003chttps://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage)\u003e.\n\nNoWrapper\n---------\n\nSets the `data` field as the HTTP body for delivery.\n\nBigQueryConfig\n--------------\n\nConfiguration for a BigQuery subscription.\n\nCloudStorageConfig\n------------------\n\nConfiguration for a Cloud Storage subscription.\n\nTextConfig\n----------\n\nThis type has no fields.\nConfiguration for writing message data in text format. Message payloads will be written to files as raw text, separated by a newline.\n\nAvroConfig\n----------\n\nConfiguration for writing message data in Avro format. Message payloads and metadata will be written to files as an Avro binary.\n\nExpirationPolicy\n----------------\n\nA policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).\n\nDeadLetterPolicy\n----------------\n\nDead lettering is done on a best effort basis. The same message might be dead lettered multiple times.\n\nIf validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail.\n\nRetryPolicy\n-----------\n\nA policy that specifies how Pub/Sub retries message delivery.\n\nRetry delay will be exponential based on provided minimum and maximum backoffs. \u003chttps://en.wikipedia.org/wiki/Exponential_backoff\u003e.\n\nRetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message.\n\nRetry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.\n\nMessageTransform\n----------------\n\nAll supported message transforms types.\n\nJavaScriptUDF\n-------------\n\nUser-defined JavaScript function that can transform or filter a Pub/Sub message."]]