Datasource setup

Connect BigQuery

Create a service account, connect BigQuery in Querio, and verify access to an approved table.

Connect BigQuery with a service-account JSON key. Give the account permission to run query jobs and read the datasets you need, then check a real table in Querio.

Before you start

  • You need permission to manage datasource credentials in Querio. See Datasources and credentials.
  • A Google Cloud administrator needs to create a service account and key, grant access, and enable the BigQuery API. Check the project's billing or sandbox setup in Google's prerequisites.
  • Choose an approved table with a result you can check independently.

Querio's form accepts the complete service-account JSON. It does not offer Google sign-in, Workload Identity Federation or a local key-file path.

1. Create a service account

  1. In Google Cloud Console, select the project that will run and bill Querio's query jobs. For catalog discovery, use a project containing the datasets you want to add.
  2. Open IAM & Admin > Service Accounts and choose Create service account.
  3. Enter a name such as querio-data-access, then complete creation. See Google's service-account procedure.
  4. Copy the account email for the grants below, for example querio-data-access@querio-demo-project.iam.gserviceaccount.com.

Querio uses the key's project_id for query jobs and lists datasets in that project. The form has no separate project field. A query can reference a fully qualified table in another project if the account has access, but that does not add the other project's datasets to Querio's discovery list.

2. Grant query and dataset access

Grant both roles to the service account, not just to your Google Cloud user:

ScopeRolePurpose
Project in the key's project_idBigQuery Job User (roles/bigquery.jobUser)Run query jobs, including the connection check.
Each dataset Querio should readBigQuery Data Viewer (roles/bigquery.dataViewer)Read tables and list their metadata.

In the query project's IAM page, choose Grant access, enter the service-account email, assign BigQuery Job User, and save. Google requires job permission on the project where the query runs, even when the data is stored elsewhere. See Google's query permissions.

For each dataset, open BigQuery > Explorer, select the dataset, then Sharing > Permissions > Add principal. Grant BigQuery Data Viewer to the same service-account email and save. A project-level Data Viewer grant is broader. See Google's dataset access steps.

Use dataset-level grants for catalog discovery. Table-only grants can allow a query but leave table listing or column introspection incomplete. Querio reads columns through INFORMATION_SCHEMA.COLUMNS; see Google's metadata permissions.

3. Create a JSON key

  1. Open the service account and its Keys tab.
  2. Choose Add key > Create new key > JSON > Create.
  3. Store the downloaded file securely. Keep its complete JSON unchanged: client_email identifies the account and project_id sets Querio's query project. See Google's key instructions.

If organization policy blocks key creation, ask your policy owner whether this integration is permitted. Querio has no keyless option in this form.

4. Connect in Querio

Open Settings > Datasources > Add datasource, choose Internal, and enter:

FieldEnter
SlugA unique identifier such as bigquery-analytics.
NameAn optional display name, such as Analytics warehouse.
Database typeBigQuery.
Service account keyPaste the entire downloaded JSON, including its private key. A filename, email address or project ID alone will not work.

Keep the JSON in the form, out of chat prompts, screenshots, source control and support messages. For the API's service_account_key format and credential replacement, see Datasources and credentials.

  1. Select Test connection. Expected: Connection successful. This tests the supplied details without saving them.
  2. Select Create. Querio tests again before saving; a failed test prevents creation.
  3. Confirm the datasource appears in Settings > Datasources.

The connection check runs SELECT 1. It verifies authentication and job execution, not access to your tables. The form has no dataset or job-location field.

5. Add tables and verify a query

  1. In Context, select the datasource and choose Add tables. Select the datasets and tables needed for your first question, then confirm Add. Check that their columns appear; review any introspection errors.
  2. Open an Explore with this datasource selected. Run this SQL, or ask Querio to run it exactly:
SELECT 6 * 7 AS answer;

Expected: one row with answer = 42. This checks query results without reading a table.

  1. Read an approved table. Replace every identifier and the filter below with a small, known test case:
SELECT order_id, order_total
FROM `querio-demo-project.analytics.orders`
WHERE order_id = 'known-test-order';

Compare the result with the same query in a trusted BigQuery workflow using the service account. Resolve missing rows or unexpected values before relying on the analysis.

For teammates to query, they need datasource permission and exactly one authorized credential. See Groups. The setup test does not establish their access.

Project and dataset troubleshooting

SymptomCheck and recovery
Key cannot be parsed or authenticatedPaste the complete JSON, preserving the private key's escaped newlines. Confirm the key and account are active. A replacement needs the complete connection details.
Missing bigquery.jobs.createGrant BigQuery Job User on the key's project to the service account, even if it has dataset access.
Connection succeeds but datasets or tables are missingCheck the key's project_id, dataset-level Data Viewer grants and catalog selection. Discovery lists datasets in the key's project.
Dataset not found or location mismatchCheck the fully qualified table name and Google's location rules. The SELECT 1 test has no table to establish a dataset location, and Querio has no location override in this form.
Access denied by VPC Service ControlsAsk your Google Cloud administrator to inspect the perimeter and access from the Querio deployment. IAM grants do not bypass a perimeter. See Google's perimeter guidance.
Query works for one person onlyCheck the other person's datasource permission and credential assignment in Groups.
Result differs from the trusted resultCheck the account, table, columns and filter with the data owner before using the result.

Continue with Analyze your data and Add and improve context.

Was this page helpful?

Last updated on December 3, 2026

On this page