Saat ini, dengan Analytics Hub, Anda dapat membuat listingan yang hanya mereferensikan set data BigQuery. Setelah berlangganan listingan untuk set data BigQuery, Analytics Hub akan membuat set data tertaut di project pelanggan.
Permintaan HTTP
POST https://analyticshub.googleapis.com/v1beta1/{name=projects/*/locations/*/dataExchanges/*/listings/*}:subscribe
Wajib. Nama resource listingan yang ingin Anda langgani, misalnya projects/myproject/locations/US/dataExchanges/123/listings/456.
Isi permintaan
Isi permintaan memuat data dengan struktur berikut:
Representasi JSON
{// Union field destination can be only one of the following:"destinationDataset": {object (DestinationDataset)}// End of list of possible types for union field destination.}
Kolom
Kolom union destination. Hasil tujuan listingan yang Anda ikuti. destination hanya ada berupa salah satu diantara berikut:
Wajib. Referensi yang mengidentifikasi set data tujuan.
friendlyName
string
Opsional. Nama deskriptif untuk set data.
description
string
Opsional. Deskripsi {i>dataset<i} yang mudah digunakan.
labels
map (key: string, value: string)
Opsional. Label yang terkait dengan set data ini. Anda dapat menggunakannya untuk mengatur dan mengelompokkan {i>dataset<i} Anda. Anda dapat menetapkan properti ini saat menyisipkan atau memperbarui set data. Lihat https://cloud.google.com/resource-manager/docs/creating-managing-labels untuk mengetahui informasi selengkapnya.
Objek yang berisi daftar pasangan "key": value. Contoh: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Berisi referensi yang mengidentifikasi set data bigquery tujuan.
Representasi JSON
{"datasetId": string,"projectId": string}
Kolom
datasetId
string
Wajib. ID unik untuk set data ini, tanpa nama project. ID hanya boleh berisi huruf (a-z, A-Z), angka (0-9), atau garis bawah (_). Panjang maksimum adalah 1.024 karakter.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2024-04-19 UTC."],[[["\u003cp\u003eThis document describes how to subscribe to a listing in Google Cloud's Analytics Hub, which currently supports subscribing to BigQuery datasets.\u003c/p\u003e\n"],["\u003cp\u003eSubscribing to a listing creates a linked dataset in the subscriber's project, and the subscription is initiated via a POST request to a specified URL that includes path parameters like project, location, and listing identifiers.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain the destination dataset details, defined as a \u003ccode\u003eDestinationDataset\u003c/code\u003e object, that specifies where the linked dataset should be created.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDestinationDataset\u003c/code\u003e requires a \u003ccode\u003edatasetReference\u003c/code\u003e, which includes the \u003ccode\u003edatasetId\u003c/code\u003e and \u003ccode\u003eprojectId\u003c/code\u003e for identifying the destination BigQuery dataset, as well as its location, and can include other details like its name, description, and labels.\u003c/p\u003e\n"],["\u003cp\u003eSubscribing to a listing requires specific OAuth scopes (\u003ccode\u003ehttps://www.googleapis.com/auth/bigquery\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e) and the \u003ccode\u003eanalyticshub.listings.subscribe\u003c/code\u003e IAM permission on the targeted listing resource.\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- [Authorization scopes](#body.aspect)\n- [IAM Permissions](#body.aspect_1)\n- [DestinationDataset](#DestinationDataset)\n - [JSON representation](#DestinationDataset.SCHEMA_REPRESENTATION)\n- [DestinationDatasetReference](#DestinationDatasetReference)\n - [JSON representation](#DestinationDatasetReference.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/v1beta1/{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\nIf successful, the response body is empty.\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\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource:\n\n- `analyticshub.listings.subscribe`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs).\n\nDestinationDataset\n------------------\n\nDefines the destination bigquery dataset.\n\nDestinationDatasetReference\n---------------------------"]]