Skip to main content
Delphina connects to Snowflake using a dedicated user and role. The role needs SELECT access to the data you want the agent to query, and — optionally — access to query history and Cortex Analyst objects so Delphina can learn from existing usage and semantics.
We recommend the warehouse provided be sized Small or larger so Delphina can execute queries with acceptable performance.

Connecting Snowflake

Step 1: Gather connection details

You’ll need the following from your Snowflake account:
FieldWhere to find itExample
Account identifierSnowflake account URL (without .snowflakecomputing.com)xy12345.us-east-1
WarehouseName of the warehouse Delphina should useDELPHINA_WH
DatabaseDefault database for the connectionANALYTICS
RoleRole granted to the Delphina userDELPHINA_ROLE

Step 2: Create the user, role, and grant data access

Run the following DDL in Snowflake. It creates a dedicated user and role and grants SELECT access to every object in a database. Prune the grants down to a smaller set of schemas/tables if you’d rather scope Delphina narrowly.
CREATE USER delphina_user <any additional user properties>;
CREATE ROLE delphina_role;
GRANT ROLE delphina_role TO USER delphina_user;

GRANT USAGE ON WAREHOUSE <warehouse_name> TO ROLE delphina_role;
GRANT USAGE ON DATABASE <database_name> TO ROLE delphina_role;

GRANT USAGE ON ALL SCHEMAS IN DATABASE <database_name> TO ROLE delphina_role;
GRANT USAGE ON FUTURE SCHEMAS IN DATABASE <database_name> TO ROLE delphina_role;

GRANT SELECT ON ALL TABLES IN DATABASE <database_name> TO ROLE delphina_role;
GRANT SELECT ON FUTURE TABLES IN DATABASE <database_name> TO ROLE delphina_role;

GRANT SELECT ON ALL VIEWS IN DATABASE <database_name> TO ROLE delphina_role;
GRANT SELECT ON FUTURE VIEWS IN DATABASE <database_name> TO ROLE delphina_role;

-- Repeat for any other relevant databases.

Step 3: Grant access to query history

Delphina uses query histories from trusted users to prioritize tables and learn how your data is used. Choose one of the two patterns below.
Give the role read access to the shared SNOWFLAKE database, which exposes ACCOUNT_USAGE.QUERY_HISTORY.
-- Read access to the SNOWFLAKE shared DB objects
GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE delphina_role;

-- Allow the role to read account usage views
GRANT MONITOR USAGE ON ACCOUNT TO ROLE delphina_role;

Step 4: (Optional) Grant access to Cortex Analyst objects

If you use Snowflake Cortex Analyst and want Delphina to reuse your existing semantic definitions, grant the following additional permissions:
-- For an internal stage that holds semantic models
GRANT READ ON STAGE <db>.<schema>.<models_stage_name> TO ROLE delphina_role;

-- For semantic views
GRANT SELECT, REFERENCES
  ON SEMANTIC VIEW <db>.<schema>.<semantic_view_name>
  TO ROLE delphina_role;

Step 5: Create the connection in Delphina

  1. Navigate to analytics.delphina.ai.
  2. Click your name in the bottom-left, then Org Admin > Warehouse Connections.
  3. Click Add Connection on the target workspace.
  4. Set the Warehouse Type to Snowflake.
  5. Fill in the account identifier, warehouse, database, role, and user credentials from the steps above.
  6. Click Create Connection, then Test Connection to verify Delphina can reach your warehouse, list tables, and access query history.

Troubleshooting

ProblemFix
Test Connection failsVerify the account identifier, warehouse, and role exist and that delphina_user can log in with the supplied credentials.
”Browse Tables” emptyConfirm USAGE is granted on the database and schema, and SELECT on the tables. Future grants only apply to objects created after the grant.
”Show Top Users” emptyEither IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE is missing or the scoped QUERY_HISTORY_SCOPED view hasn’t been shared with delphina_role.
Queries time out or feel slowIncrease the warehouse size to Small or larger, or assign a dedicated warehouse to delphina_role.
Cortex Analyst semantics not picked upCheck that READ is granted on the models stage and SELECT, REFERENCES on the semantic view.