📊 BigQuery Connection
Connect your Google BigQuery data warehouse to Meza AI.
Overview
Connect your Google BigQuery data warehouse to Meza AI to sync customer data from your analytics infrastructure. BigQuery is ideal for companies with large datasets and existing Google Cloud infrastructure.
Prerequisites
- Google Cloud project with BigQuery enabled
- Service account with BigQuery Data Viewer role
- Service account JSON key file
Creating a Service Account
Go to Google Cloud Console
Navigate to console.cloud.google.com and select your project.
Open IAM & Admin
Go to IAM & Admin → Service Accounts in the left sidebar.
Create Service Account
Click Create Service Account and enter:
- Name:
meza-ai-readonly - Description: Read-only access for Meza AI
Assign Role
Grant the BigQuery Data Viewer role to the service account.
Create Key
Go to the Keys tab, click Add Key → Create new key → JSON. Download and save the key file securely.
Connection Steps
Navigate to Databases
Go to Configuration → Databases in the left sidebar.
Select BigQuery
Click Add Connection and select BigQuery.
Upload Service Account Key
Upload your service account JSON key file.
Select Project & Dataset
Choose your Google Cloud project and default dataset.
Test & Save
Click Test Connection then Save to complete setup.
Connection Parameters
| Parameter | Description | Required |
|---|---|---|
| Service Account Key | JSON key file downloaded from Google Cloud | Yes |
| Project ID | Your Google Cloud project ID | Yes |
| Dataset | Default BigQuery dataset to query | Yes |
| Location | Dataset location (e.g., US, EU, asia-northeast1) | No |
💡 Note
Required Permissions
The service account needs these BigQuery permissions:
bigquery.datasets.get
bigquery.tables.get
bigquery.tables.list
bigquery.tables.getData
bigquery.jobs.createThe BigQuery Data Viewer role includes all these permissions. For more granular control, create a custom role with just these permissions.
Cost Optimization Tips
- Use partitioned tables — Meza AI automatically filters by partition when possible
- Limit columns — Only select columns you need in your data models
- Set up cost controls — Configure BigQuery quotas to prevent unexpected costs
- Monitor usage — Check BigQuery usage in Google Cloud Console
Troubleshooting
Permission Denied
If you see permission errors:
- Verify the service account has BigQuery Data Viewer role
- Check the project ID matches your service account project
- Ensure the dataset exists and is accessible
Invalid Key File
If the key file is rejected:
- Make sure you downloaded the JSON format (not P12)
- Check the file hasnt been modified or corrupted
- Generate a new key if needed