Connection to BigQuery

To connect Google BigQuery to the DQC Platform, you’ll need to provide a service account with read-only access and supply a few key connection values. This article walks you through the setup.


Add a BigQuery connector

To get started:

  1. Navigate to the Data Connectors screen in the DQC Platform

  2. Click on BigQuery

  3. Fill in the required connection fields as described below

Start the setup by selecting BigQuery from the connector list


Required connection information

Field

Example

Description

Name

OurBestDatabase

Any internal name to label your connection

Dataset ID

BigQuery_DB_name

The ID of your BigQuery dataset (see below)

Service account JSON

{ "type": "service_account", "project_id": "bigquery-zest-project-4121", "private_key_id": "anonymized", "private_key": "-----BEGIN PRIVATE KEY-----\anonymized }

Full JSON credentials file for a service account with appropriate permissions


Retrieve the dataset ID

  1. Log into the Google Cloud Console

  2. Go to BigQuery

  3. Select the dataset that contains the tables to be checked

  4. Copy the Dataset ID

The dataset ID uniquely identifies the group of tables for data checks


Create the service account JSON

If you don’t already have a service account with the required permissions, follow these steps:


Step 1: Add a Service Account (Optional)

  1. Go to IAM & Admin > Service Accounts

  2. Click Create Service Account

  3. Enter a name and click Continue

Add a dedicated service account for the DQC Platform


Step 2: Assign Permissions

Add the following three roles under product “BigQuery”:

  • BigQuery Data Viewer

  • BigQuery Job User

  • BigQuery Read Session User

These roles grant safe, read-only access to your data


Step 3: Generate JSON Key

  1. Select the new service account

  2. Go to the Keys tab

  3. Click Add Key > Create New Key > JSON

  4. Download the file

  5. Open the file in a text editor and copy the full JSON content

  6. Paste this into the Service account JSON field in the DQC Platform

The key allows secure automated access via the DQC Platform


Enable BigQuery API (if not yet enabled)

Before using the connector, ensure the BigQuery API is activated in your Google Cloud project.

Search for “BigQuery API” in the GCP console and click Enable


Allow Static IP Access

3.123.94.228

Troubleshooting

When DQC cannot connect to BigQuery or load its tables, it shows the reason with a short fix and links to this section. Look up the beginning of the message:

Message in DQC

Likely cause

Fix

Dataset … does not exist. …

The dataset ID is wrong or belongs to another project than the service account

Enter the dataset ID as shown in BigQuery (see Retrieve the dataset ID)

Project id … does not exist. …

The project in the service account JSON does not exist

Create the key in the project that holds the dataset

Unable to connect to Bigquery database. Reason: … Access Denied …

The service account lacks a BigQuery role

Assign BigQuery Data Viewer and BigQuery Job User (see Assign Permissions)

Unable to connect to Bigquery database. Reason: … has not been used … or it is disabled

The BigQuery API is off

Enable the BigQuery API (see Enable BigQuery API)

Unable to connect to Bigquery database. Reason: … invalid_grant …

The key was deleted or disabled

Create a new JSON key and paste it

Could not connect to the data source. …

The service account JSON is incomplete or not valid JSON

Paste the complete downloaded key file

Table not accessible anymore …

The table was renamed, moved or deleted, or the user lost access to it after the last sync

Restore the table or the access, then resync the connector

  • Synchronization failed: when a sync cannot connect, the connector shows Failed on the Data sources screen and the badge links to this section. Edit the connector and click Load tables or Save: DQC tests the connection again and shows the current reason.

  • Connection test passes, but tables do not load: reading data needs BigQuery Job User in addition to BigQuery Data Viewer.

  • Still stuck? Write to support@dqc.ai with the connector name, the time of the attempt and the full message.


💡 Notes