BigQuery
Preparation
To allow Shaped to connect to your BigQuery data warehouse, you need to grant Shaped’s GCP service account read-only access to your project, dataset, and tables. You can do this through the GCP portal or with the following steps:
- Install the gcloud command line tool.
- Contact us for our service account via email.
- Grant our service account permission to access your project, dataset, and tables via
the
roles/bigquery.dataViewer
,roles/bigquery.jobUser
androles/bigquery.readSessionUser
roles.
gcloud projects add-iam-policy-binding <YOUR_PROJECT> \
--member='serviceAccount:<OUR_SERVICE_ACCOUNT>' \
--role='roles/bigquery.dataViewer'
gcloud projects add-iam-policy-binding <YOUR_PROJECT> \
--member='serviceAccount:<OUR_SERVICE_ACCOUNT>' \
--role='roles/bigquery.jobUser'
gcloud projects add-iam-policy-binding <YOUR_PROJECT> \
--member='serviceAccount:<OUR_SERVICE_ACCOUNT>' \
--role='roles/bigquery.readSessionUser'
Connector Definition
Below are the fields required for the BigQuery connector
connectors:
- type: BigQuery
id: bigquery
dataset: ranking_dataset
project_id: project_name
location": warehouse_region
Field | Example | Description |
---|---|---|
type | BigQuery | Specifies the connector type, in this case “BigQuery”. |
id | bigquery | Specifies the connector id, in this case “bigquery”. |
project_id | project_name_12345 | The Google Cloud Platform project containing your dataset. |
dataset | movielens | The name of the BigQuery dataset. |
location | us-west1 | The project’s region. |
query | select * from table | An optional query to retrieve the data source (only one of dataset or query can be specified). |