Skip to main content

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:

  1. Install the gcloud command line tool.
  2. Contact us for our service account via email.
  3. Grant our service account permission to access your project, dataset, and tables via the roles/bigquery.dataViewer, roles/bigquery.jobUser and roles/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
FieldExampleDescription
typeBigQuerySpecifies the connector type, in this case “BigQuery”.
idbigquerySpecifies the connector id, in this case “bigquery”.
project_idproject_name_12345The Google Cloud Platform project containing your dataset.
datasetmovielensThe name of the BigQuery dataset.
locationus-west1The project’s region.
queryselect * from tableAn optional query to retrieve the data source (only one of dataset or query can be specified).