Connect & Ingest data from / to a BigQuery database

Sling CLI Setup

The following credentials keys are accepted:

  • project (required) -> The GCP project ID for the project

  • dataset (required) -> The default dataset (like a schema)

  • gc_bucket (optional) -> The Google Cloud Storage Bucket to use for loading (Recommended)

  • key_file (optional) -> The path of the Service Account JSON. If not provided, the Google Application Default Credentials will be used. You can also provide the JSON content in env var GC_KEY_BODY.

  • location (optional) -> The location of the account, such as US or EU. Default is US.

Here are examples of setting a connection named BIGQUERY. We must provide the type=bigquery property:

$ sling conns set BIGQUERY type=bigquery project=<project> dataset=<dataset> gc_bucket=<gc_bucket> key_file=/path/to/service.account.json location=<location>

Environment Variable

export BIGQUERY='{type: bigquery, project: my-google-project, gc_bucket: my_gc_bucket, dataset: public, location: US, key_file: /path/to/service.account.json}'

You can also provide Sling the Service Account JSON via environment variable GC_KEY_BODY, instead of a key_file.

export GC_KEY_BODY='{"type": "service_account","project_id": ...........}'

Sling Env File YAML

See here to learn more about the sling env.yaml file.

    type: bigquery
    project: <project>
    dataset: <dataset>
    gc_bucket: <gc_bucket>
    key_file: '<key_file>'

If you are facing issues connecting, please reach out to us at, on discord or open a Github Issue here.

Last updated