Skip to main content

Google BigQuery Setup

This guide walks you through connecting Datoria to Google BigQuery and setting up your first data project.

Prerequisites

Before you begin, make sure you have:

  1. Google Cloud Project
  1. Authentication
  1. Datoria

Authentication

Datoria works with Google Cloud's standard authentication methods. For development, we recommend using application default credentials:

gcloud auth application-default login

This will open a browser window where you can log in with your Google account. After authenticating, Datoria will use these credentials when accessing BigQuery.

Alternative Authentication Methods

For production or CI/CD environments, use a service account:

# Set the path to your service account key file
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your-service-account-key.json"

Learn more about creating service accounts.

Required Permissions

For Datoria to function properly with BigQuery, it needs sufficient permissions to create and manage database objects. The simplest approach is to use the BigQuery Admin role:

# For user accounts
gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \
--member=user:YOUR_EMAIL@example.com \
--role=roles/bigquery.admin

# For service accounts
gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \
--member=serviceAccount:YOUR_SERVICE_ACCOUNT@YOUR_PROJECT_ID.iam.gserviceaccount.com \
--role=roles/bigquery.admin

The BigQuery Admin role provides comprehensive access to manage all BigQuery resources, including:

  • Creating and managing datasets
  • Creating, updating, and deleting tables
  • Running queries and jobs
  • Creating and managing routines (UDFs, stored procedures)
  • Managing data access policies