Documentation

BigQuery

You can connect your BigQuery database to Altertable to query and analyze your data.

Prerequisites

Before connecting BigQuery to Altertable, you'll need to configure your Google Cloud project:

1. Enable the BigQuery API

Enable the BigQuery API within your Google Cloud project.

2. Check Organization Policies

Ensure your organization doesn't have the constraints/iam.disableServiceAccountKeyCreation policy enforced:

# Check at project level
gcloud resource-manager org-policies describe constraints/iam.disableServiceAccountKeyCreation --project=PROJECT_ID
# Or check at organization level
gcloud resource-manager org-policies describe constraints/iam.disableServiceAccountKeyCreation --organization=ORG_ID

If enforced, you can disable it with:

gcloud resource-manager org-policies disable-enforce constraints/iam.disableServiceAccountKeyCreation --project=PROJECT_ID

3. Create a Service Account

Create a service account (learn how to create and download a service account key) and grant it the following three roles:

  • roles/bigquery.dataViewer
  • roles/bigquery.jobUser
  • roles/bigquery.readSessionUser

If you cannot grant the roles, ensure your admin user has the orgpolicy.policyAdmin role:

gcloud organizations add-iam-policy-binding ORG_ID \
--member="user:YOUR_ADMIN_USER_EMAIL" \
--role="roles/orgpolicy.policyAdmin"

Grant missing roles with:

gcloud projects add-iam-policy-binding PROJECT_ID \
--member="serviceAccount:SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com" \
--role="THE_MISSING_ROLE"

Validate the roles with:

gcloud projects get-iam-policy PROJECT_ID \
--flatten="bindings[].members" \
--filter="bindings.members:serviceAccount:SERVICE_ACCOUNT_NAME@PROJECT_ID.iam.gserviceaccount.com" \
--format="table(bindings.role)"

Connecting to Altertable

To add a new BigQuery connection:

  1. Navigate to the Connections section in the dashboard
  2. Click New connection
  3. Select BigQuery as the engine
  4. Fill in the connection details:
    • Name: A descriptive name for your connection
    • Service Account Credentials: Upload your service account JSON key file
  5. Click Save Connection
New BigQuery connection form
New BigQuery connection form

Once connected, you can start querying your BigQuery database through Altertable's SQL engine.

Crafted with <3 by former Algolia × Front × Sorare builders© 2025 AltertableTermsPrivacySecurityCookies