Send this to Aampe
- Service account email, in the form
aampe-data-share@YOUR_PROJECT_ID.iam.gserviceaccount.com - The BigQuery region you query from, such as
USorus-central1
1. Prepare your project
In the Google Cloud project where you want the tables:- Turn on billing.
- Enable the BigQuery API.
- Enable the Analytics Hub API.
2. Create a service account
- Open Service accounts for that project.
- Click Create service account.
- Name it
aampe-data-share. - Copy the email address.
3. Grant roles on your project
On your project, grant that service account:- BigQuery User (
roles/bigquery.user), so it can create the linked dataset and run queries - BigQuery Data Viewer (
roles/bigquery.dataViewer), so it can read the shared tables
- Open IAM.
- Click Grant access.
- Paste the service account email.
- Add both roles and save.
4. Subscribe once
Wait until Aampe confirms the share is ready, then open the link Aampe sends. Subscribing creates a read-only linked dataset in your project. The link path contains four values:projects/PUBLISHER_PROJECT/locations/LOCATION/dataExchanges/DATA_EXCHANGE_ID/listings/LISTING_ID
A service account cannot click Subscribe in the browser. Run the command below once as that service account. The person who runs it needs Service Account Token Creator (roles/iam.serviceAccountTokenCreator) on the service account.
PUBLISHER_PROJECT, LOCATION, DATA_EXCHANGE_ID, and LISTING_ID come from the link. YOUR_PROJECT_ID is your project. datasetId is the name of the dataset in your project. Set location to the region you sent Aampe.