Skip to content

Connect Snowflake

Datarelix connects to Snowflake through a read-only query service. All queries are validated and executed inside that service — the model never sees credentials or executes raw SQL against your database.

Prerequisites

  • A Snowflake account.
  • A read-only role with USAGE on the warehouse, database, and schema, plus SELECT on the objects you want to analyze — see Snowflake access control.
  • A warehouse with capacity appropriate to your report. With AUTO_RESUME enabled, USAGE permits query-triggered resume; OPERATE is for explicit operations such as manual resume. Warehouse privileges.
  • A Snowflake user that can assume the role.
  • Network reachability. If the account has a network policy, add Datarelix’s egress IPs to its allowed list, or logins are rejected. Accounts locked to AWS/Azure PrivateLink (a *.privatelink.snowflakecomputing.com URL) accept connections only over the private endpoint and aren’t reachable from the hosted service.

Auth modes

Username & password

The current connector supports username and password only. Snowflake is rolling out stronger authentication, including removal of password access for service users. Confirm your account’s enforcement date and authentication policy with its owner before proceeding. Accounts requiring MFA or non-password service authentication are incompatible with this connector. Key-pair and OAuth are not available here. Snowflake authentication requirements

Do not create a password-only service identity or weaken an account policy to fit this connector. If your account requires another method, contact Datarelix before setup.

Database owner: grant reporting access to an approved existing identity

Use a role authorised to manage these grants. Replace the example objects with the specific reporting tables or views required:

CREATE ROLE datarelix_reader;
GRANT USAGE ON WAREHOUSE your_warehouse TO ROLE datarelix_reader;
GRANT USAGE ON DATABASE your_database TO ROLE datarelix_reader;
GRANT USAGE ON SCHEMA your_database.your_schema TO ROLE datarelix_reader;
GRANT SELECT ON TABLE your_database.your_schema.orders TO ROLE datarelix_reader;
GRANT ROLE datarelix_reader TO USER approved_existing_user;

Grant views separately where needed. Optionally, GRANT SELECT ON FUTURE TABLES IN SCHEMA your_database.your_schema TO ROLE datarelix_reader; makes tables created later readable automatically: it reduces maintenance and widens future access, applies only to new tables (views need their own future grant) and does not replace grants on existing objects. Review inherited roles too. Snowflake GRANT reference

Where to find your credentials

FieldWhere to get it
Account identifierSnowsight UI → Admin → Accounts → copy the Account column value (preferred orgname-account_name form), or read it from your Snowflake web URL
WarehouseSnowsight → Admin → Warehouses — copy the warehouse name
DatabaseSnowsight → Data → Databases — copy the database name
RoleThe role you created above (e.g. DATARELIX_READER)
SchemaThe schema you granted access to (e.g. PUBLIC)
UsernameThe approved existing user
PasswordThe approved credential, only where the account policy permits it

Finding the account identifier

Snowflake supports two account identifier formats. The preferred modern form is orgname-account_name (e.g. myorg-prod1); the legacy form is <locator>[.<region>][.<cloud>]:

Cloud / regionExampleNotes
AWS US West (Oregon)xy12345No region segment — legacy exception.
AWS, any other regionxy12345.us-east-2.awsRegion + .aws.
Azure, any regionxy12345.east-us-2.azureRegion + .azure.
GCP, any regionxy12345.us-central1.gcpRegion + .gcp.

Both forms work in the connection form. Find yours under Admin → Accounts in Snowsight or from your Snowflake web URL (<locator>.<region>.snowflakecomputing.com).

What to enter

Account identifier: myorg-prod1 (or legacy: xy12345.us-east-1.aws)
Warehouse: YOUR_WAREHOUSE
Database: YOUR_DATABASE
Role: DATARELIX_READER
Schema: PUBLIC
Username: datarelix_reader
Password: ••••••••

Scope semantics

The Schema field supplies the default schema. Explicit allowed-schema selections define the query scope; confirm the role has access to each selected schema. The default is PUBLIC when no schema is supplied.

Review the allowed-schema list before asking a question involving several schemas.

Discovery

Fully supported. Discovery reads <database>.information_schema to list tables, columns, primary keys and declared foreign keys.

Foreign keys are declaration-only. Snowflake does not enforce FK constraints on standard tables — they’re informational metadata. Discovery returns an empty relationship graph if your warehouse was created without declared FKs; that’s expected, not a discovery failure.

Snowflake SQL primer

Standard SQL with a few Snowflake-specific features Datarelix is aware of:

  • Identifiers — Unquoted identifiers fold to uppercase. Double-quote case-sensitive names.
  • Pagination — LIMIT n OFFSET m.
  • Window filters — Use QUALIFY, similar to HAVING for window functions.
  • Timestamps — TIMESTAMP_NTZ (no TZ), TIMESTAMP_LTZ (local), TIMESTAMP_TZ.
  • Semi-structured data — VARIANT, OBJECT, and ARRAY with LATERAL FLATTEN for unnesting.
  • Three-part names — DATABASE.SCHEMA.TABLE.

Limitations

  • Read-only — Datarelix rejects write and DDL statements before they run.
  • Multi-statement queries blocked — one SELECT/WITH/UNION per question. CTEs with multiple table references in a single WITH clause are fine.
  • System schemas blocked — INFORMATION_SCHEMA queries are allowed only during discovery; ACCOUNT_USAGE is always blocked.
  • Statement timeout — set per session (30 s default). Narrow long-running reports or contact support about applicable limits.
  • Row limit — results are capped at 5,000 rows.

Troubleshooting

SymptomLikely causeFix
390100: Incorrect username or passwordBad credentialsTest from the Snowflake web UI first.
Warehouse 'X' does not exist or not authorizedRole missing USAGE on warehouseGRANT USAGE ON WAREHOUSE X TO ROLE Y.
Warehouse is suspendedAuto-resume is disabled or warehouse use is not permittedCheck USAGE and AUTO_RESUME; ask an operator to resume it if manual action is required.
Object does not exist on discoveryRole missing USAGE on database/schemaGRANT USAGE ON DATABASE/SCHEMA to the role.
IP ... is not allowed to access SnowflakeAccount network policy blocks the egress IPAdd Datarelix’s egress IPs to the account/user network policy allowed list.
Statement timeout reachedQuery exceeded the session timeoutNarrow the date range or source workload; a result LIMIT alone may not reduce compute. Contact support if needed.
Discovery returns 0 tablesRole lacks SELECT on the schema’s existing objectsGRANT SELECT ON ALL TABLES IN SCHEMA X TO ROLE Y, or on the specific tables and views. A future-table grant covers only tables created later and is a separate, optional choice.

Compute billing

Snowflake warehouse charges are separate from your Datarelix plan. Review size, auto-suspend and the minimum billed on warehouse startup with the owner; repeated dashboard refreshes can trigger more compute. Warehouse considerations