Skip to main content

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).
tip

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:

FieldDescriptionWhere to Find ItExample
AccountYour Snowflake account identifierSnowflake URL: https://<account>.snowflakecomputing.comxy12345.us-east-1
WarehouseThe compute warehouse to use for queriesAdmin → Warehouses in SnowflakeANALYTICS_WH
DatabaseThe database to connect toData → Databases in SnowflakePRODUCTION
SchemaThe default schema within the databaseInside the database in SnowflakePUBLIC
UsernameThe Snowflake login usernameYour Snowflake user settingsROUNDTABLE_READER
PasswordThe Snowflake login passwordSet during user creation••••••••
info

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

  1. Go to your Roundtable organization's Settings → Connections.
  2. Click Add Connection.
  3. Select Snowflake as the connection type.
  4. Fill in the required fields:
FieldValue
Connection NameA friendly label (e.g., Production Snowflake)
AccountYour Snowflake account identifier
WarehouseThe warehouse name
DatabaseThe database name
SchemaThe schema name
UsernameThe Snowflake username
PasswordThe Snowflake password
  1. Click Save.
warning

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:

  1. Connect to your Snowflake account using the provided credentials.
  2. Verify that the warehouse, database, and schema exist.
  3. Confirm that the user has query permissions.

Common test failures and their fixes:

ErrorCauseFix
Incorrect username or passwordWrong credentialsDouble-check username and password
Warehouse does not existTypo or warehouse is suspendedVerify the warehouse name; resume it if suspended
Database/Schema not foundIncorrect database or schema nameCheck the names in the Snowflake UI
Connection timeoutNetwork or firewall issueEnsure Snowflake allows inbound connections from GCP

Step 4: Attach to a Workspace

  1. Open the workspace where you want Snowflake access.
  2. Go to Settings → Connections.
  3. Select your Snowflake connection from the dropdown.
  4. 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:

  1. Generate a SQL query like:
    SELECT
    DATE(event_timestamp) AS activity_date,
    COUNT(DISTINCT user_id) AS daily_active_users
    FROM PRODUCTION.PUBLIC.EVENTS
    WHERE event_timestamp >= DATEADD(DAY, -7, CURRENT_DATE())
    GROUP BY activity_date
    ORDER BY activity_date;
  2. Execute the query against your Snowflake warehouse.
  3. Return the results in a formatted table with a summary.
tip

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.