Snowflake
This guide walks you through connecting a Snowflake database to Roundtable so the AI can query your data using the query_snowflake tool.
Prerequisites
Before you begin, make sure you have:
- An active Snowflake account.
- A Snowflake user with access to the warehouse, database, and schema you want to query.
- Admin access to your Roundtable organization (to create connections).
We recommend creating a dedicated Snowflake user for Roundtable (e.g., ROUNDTABLE_READER) with a read-only role. This keeps your personal credentials out of the system and makes access easy to audit and revoke.
Step 1: Gather Your Snowflake Credentials
You'll need the following values from your Snowflake account:
| Field | Description | Where to Find It | Example |
|---|---|---|---|
| Account | Your Snowflake account identifier | Snowflake URL: https://<account>.snowflakecomputing.com | xy12345.us-east-1 |
| Warehouse | The compute warehouse to use for queries | Admin → Warehouses in Snowflake | ANALYTICS_WH |
| Database | The database to connect to | Data → Databases in Snowflake | PRODUCTION |
| Schema | The default schema within the database | Inside the database in Snowflake | PUBLIC |
| Username | The Snowflake login username | Your Snowflake user settings | ROUNDTABLE_READER |
| Password | The Snowflake login password | Set during user creation | •••••••• |
The Account identifier format varies by Snowflake region and cloud provider. Common formats include xy12345.us-east-1 (AWS), xy12345.us-central1.gcp (GCP), and xy12345.east-us-2.azure (Azure). Check your Snowflake URL if you're unsure.
Step 2: Add the Connection in Roundtable
- Go to your Roundtable organization's Settings → Connections.
- Click Add Connection.
- Select Snowflake as the connection type.
- Fill in the required fields:
| Field | Value |
|---|---|
| Connection Name | A friendly label (e.g., Production Snowflake) |
| Account | Your Snowflake account identifier |
| Warehouse | The warehouse name |
| Database | The database name |
| Schema | The schema name |
| Username | The Snowflake username |
| Password | The Snowflake password |
- Click Save.
Snowflake credentials are stored in GCP Secret Manager and injected into workspace pods as environment variables. They are never exposed in the UI after initial entry. Only organization admins can view or edit connections.
Step 3: Test the Connection
After saving, click the Test Connection button. Roundtable will:
- Connect to your Snowflake account using the provided credentials.
- Verify that the warehouse, database, and schema exist.
- Confirm that the user has query permissions.
Common test failures and their fixes:
| Error | Cause | Fix |
|---|---|---|
Incorrect username or password | Wrong credentials | Double-check username and password |
Warehouse does not exist | Typo or warehouse is suspended | Verify the warehouse name; resume it if suspended |
Database/Schema not found | Incorrect database or schema name | Check the names in the Snowflake UI |
Connection timeout | Network or firewall issue | Ensure Snowflake allows inbound connections from GCP |
Step 4: Attach to a Workspace
- Open the workspace where you want Snowflake access.
- Go to Settings → Connections.
- Select your Snowflake connection from the dropdown.
- Click Save.
The query_snowflake tool is now active in this workspace.
Example: Querying Your Data
Once the connection is live, workspace members can ask the AI to query Snowflake in natural language:
User:
Show me the daily active users for the past 7 days.
AI response (using query_snowflake):
The AI will:
- Generate a SQL query like:
SELECTDATE(event_timestamp) AS activity_date,COUNT(DISTINCT user_id) AS daily_active_usersFROM PRODUCTION.PUBLIC.EVENTSWHERE event_timestamp >= DATEADD(DAY, -7, CURRENT_DATE())GROUP BY activity_dateORDER BY activity_date;
- Execute the query against your Snowflake warehouse.
- Return the results in a formatted table with a summary.
For best results, add your table schemas and business terminology to the workspace's system prompt. This helps the AI generate accurate queries without trial and error.