Setup BigQuery
Learn how to securely connect Julius to your Google BigQuery data warehouse using service account authentication.
What is BigQuery?
Google BigQuery is a fully-managed, serverless data warehouse that enables super-fast SQL queries using the processing power of Google’s infrastructure. It’s designed for analyzing large datasets and is commonly used for business intelligence, data analytics, and machine learning.
BigQuery Connection Requirements
Unlike traditional databases that use username/password authentication, BigQuery uses Google Cloud Service Accounts for secure API access. This means you’ll need:
-
A Google Cloud Project with BigQuery enabled
-
A Service Account with appropriate permissions
-
A Service Account Key (JSON file) for authentication
-
Below are the minimum required BigQuery permissions for Julius to work.
Providing the minimum required permissions
- Navigate to the Google Cloud Console IAM Roles
- Create a new role with the following permissions:
Minimum Required Permissions
Your service account needs at least the following permissions to work with BigQuery:
bigquery.jobs.create
- Required to execute a BigQuery jobbigquery.readsessions.create
- Required to create a read sessionbigquery.readsessions.getData
- Required to get data from a read sessionbigquery.tables.get
- Required to access metadata about a tablebigquery.tables.getData
- Required to get data from a tablebigquery.tables.list
- Required to list available tables in a datasetbigquery.routines.get
- Required to access metadata about a routinebigquery.routines.list
- Required to list available routines in a dataset
- Assign the roles to the service account
More Granular Permissions
The following permissions allow julius to access information about available tables. Currently, BigQuery does not provide a way to restrict viewing metadata to specific tables. However, you can restrict access to viewing the data within specific tables.
bigquery.tables.get
- Required to access metadata about a tablebigquery.tables.list
- Required to list available tables in a datasetbigquery.routines.get
- Required to access metadata about a routinebigquery.routines.list
- Required to list available routines in a dataset
You can view Google’s documentation to understand why we need these permissions: BigQuery Information Schema Tables
With this, you could create two roles, one role that allows julius to access the high level metadata about the tables and another role that allows julius to access particular data within a subset of tables.
The second role would contain the following permissions:
bigquery.tables.getData
- Required to get data from a tablebigquery.readsessions.getData
- Required to get data from a read session
You can then apply more granular permissions for each table you want to allow julius to access on this role.
Connecting Julius to BigQuery
Navigate to Data Connectors
- Go to your Julius Data Connectors Settings 2. Click Create new Data Connector 3. Select BigQuery from the available options
Configure Connection Details
You’ll see a form with the following fields:
Fields marked with an asterisk (*) are required to establish a connection.
- What it is: A friendly name to identify this BigQuery connection
- Example: “Production Analytics” or “Sales Data Warehouse”
- Tip: Choose a name that helps you remember which BigQuery project/datasets this connects to
- What it is: The complete JSON content from your downloaded service account key file
- How to use: Open the downloaded JSON file in a text editor and copy the entire contents
- Security: Julius encrypts and securely stores these credentials
Make sure to copy the entire JSON content including the opening and closing curly braces { }
. Missing any part will cause authentication to fail.
- What it is: Multi-Factor Authentication type if your organization requires additional security
- When needed: Only if your Google Cloud organization has additional authentication requirements
- Most users: Can leave this blank unless specifically required by your organization’s security policy
Test and Save Connection
- Click Add Connection to test the connection
- Julius will validate your service account credentials and access permissions
- If successful, your connector will be saved and ready to use
- If there’s an error, check the common issues section below
Troubleshooting Common Issues
Authentication failed or invalid credentials
Authentication failed or invalid credentials
- Verify you copied the complete JSON content (including braces) - Check that the service account still exists in Google Cloud Console - Ensure the service account key hasn’t been deleted or disabled - Confirm the JSON format is valid (no extra characters or line breaks)
Permission denied errors
Permission denied errors
- Verify the service account has at minimum the
bigquery.jobs.create
,bigquery.tables.get
, andbigquery.tables.list
permissions - Check that the service account has BigQuery Job User and BigQuery Data Viewer roles - Check if datasets have additional access restrictions - Ensure BigQuery API is enabled in your Google Cloud project - Confirm you’re using the correct Google Cloud project
Julius can't find my tables or datasets
Julius can't find my tables or datasets
- Verify the service account has access to the specific datasets - Check dataset regions - ensure they’re in the same region or multi-region - Confirm table names and dataset IDs are correct - Ensure datasets aren’t deleted or moved to a different project
Using Your BigQuery Connector
Once your BigQuery connector is set up:
-
Start a conversation with Julius
-
Ask about your data using natural language:
- “Show me sales data from the last quarter”
- “What’s the average order value by region?”
- “Create a chart showing user growth over time”
-
Julius will automatically:
- Connect to your BigQuery project
- Write and execute SQL queries
- Handle BigQuery’s specific syntax and functions
- Present results in easy-to-understand formats
- Create visualizations when requested
Julius understands BigQuery’s unique features like nested/repeated fields, array functions, and standard SQL syntax. You don’t need to know BigQuery-specific SQL!