Skip to content

BigQuery

This connector allows you to connect to Google BigQuery and execute queries against your datasets.

Config Schema

FieldTypeRequiredDescription
typestringyesconstant: bigquery
project_idstringyesYour Google Cloud Project ID
datasetstringyesThe BigQuery dataset name
credentialsstringyesGoogle Cloud service account credentials JSON
endpointstringnoCustom BigQuery API endpoint (for testing)
conn_stringstringnoJSON-formatted connection string with all parameters

Config example:

type: bigquery
project_id: your-project-id
dataset: your_dataset
credentials: |
{
"type": "service_account",
...
}

Or as alternative with JSON-formatted connection string:

type: bigquery
conn_string: |
{
"project_id": "your-project-id",
"dataset": "your_dataset",
"credentials": {
"type": "service_account",
...
}
}

Features

  • Table discovery
  • Query execution with parameters
  • Schema inference
  • Row sampling

Service Account Setup

To use this connector, you’ll need to set up a Google Cloud service account with appropriate permissions:

1. Go to Google Cloud Console

2. Create a Service Account

  • Navigate to IAM & AdminService Accounts (direct link).
  • Click Create Service Account.
  • Enter the account name and description, then click Create.
  • In the Grant this service account access to the project section, add the following roles:
    • BigQuery Data Viewer (view data)
    • BigQuery Metadata Viewer (to be able get meta information about tables)
    • BigQuery Job User (to be able execute queries)
  • Click Done.

img

3. Create a JSON Key

  • Find the newly created service account in the list.
  • Open its page and go to the Keys tab.
  • Click Add KeyCreate new key.
  • Select JSON and click Create.
  • The credentials file will be automatically downloaded (your-project-key.json).

Limitations

  • BigQuery doesn’t support traditional primary keys
  • Credentials must be provided as a JSON string
  • Some BigQuery-specific features like clustering and partitioning are not exposed through this connector