Database guides

BigQuery

This guide covers connecting to Google BigQuery in Sheeta AI. The connection form offers three authentication types: Google Login (the default), OAuth2 and Service Account.

Connecting to BigQuery

Step 1: Open connection settings

In the Database sidebar, click Manage database connections. Click Add and select BigQuery.

Step 2: Enter connection name

Enter a descriptive name for your connection. This helps you identify the connection when you have multiple BigQuery connections.

Step 3: Enter project ID

Enter your Google Cloud Project ID. After you sign in with Google, the Project ID field lists your projects and lets you search them; you can also type an ID. You can find the ID in the Google Cloud Console at the top of the page or in the project selector dropdown.

Google Cloud Console showing project ID

Step 4: Authentication

You can authenticate to BigQuery using Google Login or a Service Account. The OAuth2 tab accepts an OAuth2 credentials JSON that you already have. If you paste a credentials JSON, the form switches to the matching tab and fills in the Project ID.

This method uses your own Google account, the same way you use BigQuery in its console. You do not need to install the Google Cloud SDK. Your credentials are stored on your computer and are never sent to Sheeta.

  • Click the Sign in with Google button
  • Select the email that has permissions to the filled project ID
  • Check all necessary permissions and complete the login processBigQuery connection modal after Google login
  • Close the browser tab and head back to Sheeta AI. The form shows Logged in as with your email. Sign-in times out after three minutes.
  • Click Test Connection to verify your credentials work. Once successful, click Save to store the connection.
BigQuery connection modal after Google login

Google credentials on your computer

Google sign-in writes Application Default Credentials to ~/.config/gcloud/application_default_credentials.json. This replaces any credentials you created there with gcloud auth application-default login.

Query cost check

BigQuery charges by the amount of data a query scans, so Sheeta AI checks the estimated cost first.

  • Opening a table shows a free quick sample with the message Showing quick table sample. Full preview requires approval.
  • Before a full table preview or a query runs, Sheeta AI does a dry run to estimate the bytes scanned and the cost.
  • If the estimate is at or above your threshold, Sheeta AI asks before running. Choose Proceed anyway, or reduce the columns and add filters to scan less data.

The default threshold is $0.05. Change it in Settings > BigQuery > Cost warning threshold.