No momento, com o Analytics Hub, você pode criar listagens que se referem apenas aos conjuntos de dados do BigQuery. Após a assinatura de uma listagem de um conjunto de dados do BigQuery, o Analytics Hub cria um conjunto de dados vinculado no projeto do assinante.
Solicitação HTTP
POST https://analyticshub.googleapis.com/v1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe
Obrigatório. Nome do recurso da listagem em que você quer se inscrever. Por exemplo, projects/myproject/locations/US/dataExchanges/123/listings/456.
Corpo da solicitação
O corpo da solicitação contém dados com a seguinte estrutura:
Representação JSON
{// Union field destination can be only one of the following:"destinationDataset": {object (DestinationDataset)}// End of list of possible types for union field destination.}
Campos
Campo de união destination. Destino resultante da listagem em que você se inscreveu. destination pode ser apenas de um dos tipos a seguir:
Obrigatório. Uma referência que identifica o conjunto de dados de destino.
friendlyName
string
Opcional. Um nome descritivo do conjunto de dados.
description
string
Opcional. Uma descrição fácil de usar do conjunto de dados.
labels
map (key: string, value: string)
Opcional. Os rótulos associados a este conjunto de dados. Você pode usá-los para organizar e agrupar seus conjuntos de dados. Você pode definir essa propriedade ao inserir ou atualizar um conjunto de dados. Consulte https://cloud.google.com/resource-manager/docs/creating-managing-labels para saber mais informações.
Um objeto com uma lista de pares "key": value. Exemplo: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Contém a referência que identifica um conjunto de dados de destino do BigQuery.
Representação JSON
{"datasetId": string,"projectId": string}
Campos
datasetId
string
Obrigatório. Um ID exclusivo deste conjunto de dados, sem o nome do projeto. O ID precisa conter apenas letras (a-z, A-Z), números (0-9) ou sublinhados (_). O comprimento máximo é de 1.024 caracteres.
projectId
string
Obrigatório. O ID do projeto que contém esse conjunto de dados.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2024-04-29 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."]]