BigQuery
Use this database with SeekWell for analysis. Connect your data to SeekWell using a new connection or credentials copied from an existing Extract connector.
Overview
Extract connects to BigQuery as a source by running SQL queries you define and streaming the results as datasets. Each dataset is a named SQL query that becomes a stream in Extract. Queries can run in Full Refresh mode or Incremental Changes mode when you provide a timestamp column.
This connector uses two retrieval paths:
- Storage Read API for fast, columnar reads when the query is a simple
SELECT * FROM <table>(with an optionalWHEREclause). - Jobs + getQueryResults for complex SQL and for views when materialization is not enabled.
Prerequisites
- A BigQuery project and datasets you want to query.
- A service account with permission to run queries and read data.
- (Recommended) The BigQuery Storage API enabled in the project for faster reads.
- Network access for Extract to reach BigQuery (standard Google APIs). If your organization uses VPC Service Controls, ensure the service account and the environment running Extract are allowed by your perimeter policies to access the target project/dataset.
Assign these roles to the service account used by Extract:
roles/bigquery.dataViewer(read table data)roles/bigquery.jobUser(run queries)roles/bigquery.readSessionUser(Storage Read API)
If you enable view materialization (see below), also grant write access on the temp dataset:
roles/bigquery.dataEditor(on the temp dataset only)
Authentication
BigQuery supports two authentication options:
- Use Singular-managed service account (recommended): Singular provides a service account key for the connector to use. Jobs are executed in (and billed to) the
project_idyou configure in the connector. - Use your own service account: Provide your own Google Cloud service account key JSON. Jobs are executed in (and billed to) the
project_idyou configure in the connector (not the project embedded in the service account key).
When using your own service account, ensure it has the required BigQuery permissions on the datasets you want to read, and that it can run jobs in the configured project_id.
Setup Guide
Step 1 - Create a service account
Create a service account in the Google Cloud Console and generate a JSON key file.
When using your own service account, the connector will run BigQuery jobs in (and bill to) the Project ID you configure in the connector, regardless of any project_id value inside the JSON key.
Step 1b - Using the Extract managed service account (optional)
If you do not want to provide your own service account, set Use own Service Account to false.
In that case, you must grant BigQuery access to Extract’s managed service account:
- In GCP, go to IAM & Admin → IAM.
- Click Grant Access.
- Add the Extract managed service account email shown in the connector UI:
singular-etl@singular-etl.iam.gserviceaccount.com - Grant the required roles:
roles/bigquery.dataViewerroles/bigquery.jobUserroles/bigquery.readSessionUser
- If you use a Temp Dataset for view materialization, also grant:
roles/bigquery.dataEditor(on the temp dataset only)
You can do this via the CLI as well:
PROJECT_ID=your-project-id
SA_EMAIL=singular-etl@singular-etl.iam.gserviceaccount.com
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${SA_EMAIL}" \
--role="roles/bigquery.dataViewer"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${SA_EMAIL}" \
--role="roles/bigquery.jobUser"
gcloud projects add-iam-policy-binding "$PROJECT_ID" \
--member="serviceAccount:${SA_EMAIL}" \
--role="roles/bigquery.readSessionUser"
Step 2 - Grant permissions
Grant the roles listed above to the service account at the project or dataset level.
Step 3 - Enable the Storage API (recommended)
In your GCP project, enable:
- BigQuery API
- BigQuery Storage API
Step 4 - Configure the connector in Extract
Fill in the connection fields (see parameters below), then add at least one dataset and run a test sync.