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
- 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.
- Open IAM & Admin > Service Accounts and choose Create service account.
- Enter a name such as
querio-data-access, then complete creation. See Google's service-account procedure. - 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:
| Scope | Role | Purpose |
|---|---|---|
Project in the key's project_id | BigQuery Job User (roles/bigquery.jobUser) | Run query jobs, including the connection check. |
| Each dataset Querio should read | BigQuery 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
- Open the service account and its Keys tab.
- Choose Add key > Create new key > JSON > Create.
- Store the downloaded file securely. Keep its complete JSON unchanged:
client_emailidentifies the account andproject_idsets 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:
| Field | Enter |
|---|---|
| Slug | A unique identifier such as bigquery-analytics. |
| Name | An optional display name, such as Analytics warehouse. |
| Database type | BigQuery. |
| Service account key | Paste 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.
- Select Test connection. Expected: Connection successful. This tests the supplied details without saving them.
- Select Create. Querio tests again before saving; a failed test prevents creation.
- 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
- 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.
- 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.
- 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
| Symptom | Check and recovery |
|---|---|
| Key cannot be parsed or authenticated | Paste 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.create | Grant 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 missing | Check 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 mismatch | Check 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 Controls | Ask 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 only | Check the other person's datasource permission and credential assignment in Groups. |
| Result differs from the trusted result | Check the account, table, columns and filter with the data owner before using the result. |
Continue with Analyze your data and Add and improve context.
Last updated on December 3, 2026