Warehouse Connection
Connect your data warehouse so the bot can run SQL queries, explore schemas, and analyze your data. Currently supports Google BigQuery.
Setting Up BigQuery
1. Create a service account
- Go to Google Cloud Console → Service Accounts
- Select your project
- Click Create Service Account
- Name it something descriptive (e.g.
tvaras-bigquery) - Click Create and Continue
2. Grant permissions
Assign these roles to the service account on your project:
| Role | Purpose |
|---|---|
BigQuery Data Viewer | Read tables and views |
BigQuery Job User | Run queries |
BigQuery Metadata Viewer | List datasets and tables |
For write operations (creating tables, data output), also grant BigQuery Data Editor.
3. Download the JSON key
- Click on the service account you created
- Go to Keys tab
- Click Add Key → Create new key → JSON
- Save the downloaded file
4. Upload in admin panel
- Go to Admin → Warehouse
- Upload the JSON key file (or paste its contents)
- The GCP project ID is auto-extracted from the key
- Set the BigQuery location (e.g.
US,EU,europe-west1) - Click Save & Connect
- Click Test Connection to verify
How It Works
- The service account JSON key is encrypted before being stored in the database
- The BigQuery client loads credentials from the database on first use
- If no database credentials exist, it falls back to the
GOOGLE_APPLICATION_CREDENTIALSenvironment variable - Credential changes take effect immediately (no restart needed)
Supported Operations
Once connected, the bot can:
- Run arbitrary SQL queries against your BigQuery project
- List all datasets and tables
- Inspect table schemas (columns, types, descriptions)
- Export query results as charts, CSVs, or PDFs
Future Support
Support for Snowflake, Amazon Redshift, and Databricks is planned. The warehouse page includes a type selector that will be expanded as new connectors are built.