1. Create a Service Account key
Open the service accounts page
Open the Google Cloud Console, select the target project at the top, go to IAM & Admin → Service Accounts, click Create Service Account, and give it a name (for example,
asktable-readonly).Grant BigQuery permissions
Grant the service account the following two roles — the minimum required for AskTable’s read-only queries:
To expose only specific datasets, skip the project-level Data Viewer role: in the BigQuery console, click Share → Add Principal on the target dataset and grant Data Viewer to the service account there. Job User still needs to be granted at the project level.
| Role | Purpose |
|---|---|
BigQuery Data Viewer (roles/bigquery.dataViewer) | Read table data and metadata |
BigQuery Job User (roles/bigquery.jobUser) | Submit query jobs |
Two situations prevent key creation: BigQuery sandbox projects (without billing enabled) do not support service account keys, and some organization policies (
iam.disableServiceAccountKeyCreation) disable key creation — contact your Google Cloud administrator if you hit an error.2. Connect in AskTable
In the left main navigation, click More, then click Data Sources in the data workspace sidebar and click Add Data in the top right. Under the Big Data category, select Google BigQuery and fill in the connection details:| Field | Description |
|---|---|
| Data name | Optional. Leave blank to auto-generate. |
| Service Account JSON | Paste the full content of the key file, or click Upload JSON file to select the downloaded .json file and fill it in automatically |
The key is stored encrypted in AskTable and is never echoed back by any page or API. To rotate the key later, paste a new one in the connection settings on the data source detail page; leaving it blank keeps the current key unchanged.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
| Invalid credential format | The pasted content is not complete JSON, or is missing the project_id / client_email / private_key fields. Re-copy the entire key file. |
| Connection test fails with an authentication error | The key has been revoked or deleted. Create a new key in Google Cloud. |
| Connection test fails with a permission error | The service account is missing the BigQuery Job User role and cannot submit queries. |
| A dataset is missing on the table selection page | The service account lacks BigQuery Data Viewer on that dataset — grant it as described in step 1. |
Next steps
- Managing Data — view and manage connected data sources
- Table and Field Notes — add business descriptions to improve AI accuracy
