Connecting BigQuery to Index

To establish a connection between Index and your BigQuery database, you’ll need to configure a service account in Google Cloud Platform (GCP) with appropriate data access permissions.

Connection Requirements

To successfully connect, you’ll need three essential pieces of information:

  • Project ID
  • Service Account Email
  • Private Key

Connection Requirements

To successfully connect, you’ll need three essential pieces of information:

  • Project ID
  • Service Account Email
  • Private Key

Project ID Format Example:

project-name-123456

Service Account Email Format Example:

serviceaccount@project-name-123456.iam.gserviceaccount.com

Private Key Format Example:

-----BEGIN PRIVATE KEY-----\\n
MIIEvgIBADANBgkq...F6HhhtvY\\n
-----END PRIVATE KEY-----\\n

Service Account Setup Guide

Creating Your Service Account

  1. Visit the GCP Console’s IAM & Admin > Service Account section
  2. Click “Create Account”

Configuring Permissions

Assign these two roles to your service account:

  • BigQuery Data Viewer
  • BigQuery Job User

Generating Authentication Credentials

  1. Locate your service account in the overview
  2. Open the Actions menu
  3. Select “Manage keys”
  4. Click “Add key” → “Create new key”
  5. Choose JSON as your key type
  6. Download the generated JSON file

Connecting to Index

Open your downloaded JSON file and locate these fields:

  • project_id
  • client_email
  • private_key

Enter these values in the corresponding fields in Index’s database connection form.

Sample JSON Configuration

  "type": "service_account",
  "project_id": "project-name-123456",
  "private_key_id": "efb9f928a3869d2d20c87e108405d7f0bf68a753",
  "private_key": "-----BEGIN PRIVATE KEY-----\\nMIIEvQIuTx+U=\\n-----END PRIVATE KEY-----\\n",
  "client_email": "index@project-name-123456.iam.gserviceaccount.com",
  "client_id": "123456789",
  "auth_uri": "<https://accounts.google.com/o/oauth2/auth>",
  "token_uri": "<https://oauth2.googleapis.com/token>",
  "auth_provider_x509_cert_url": "<https://www.googleapis.com/oauth2/v1/certs>",
  "client_x509_cert_url": "<https://www.googleapis.com/robot/v1/metadata/x509/index%40project-name-123456.iam.gserviceaccount.com>"

Required Permissions

For custom role configuration, ensure these permissions are included:

  • bigquery.datasets.get
  • bigquery.jobs.create
  • bigquery.tables.get
  • bigquery.tables.getData
  • bigquery.tables.list

Common Issues

Decoder Error

If you encounter error:1E08010C:DECODER routines::unsupported, verify your private key format matches:

-----BEGIN PRIVATE KEY-----\\nMII...tvY\\n-----END PRIVATE KEY-----\\n

Invalid JWT Signature

If you see invalid_grant: Invalid JWT Signature, your private key may be invalid. Generate a new one through your service account settings.