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
USAGEon the warehouse, database, and schema, plusSELECTon the objects you want to analyze — see Snowflake access control. - A warehouse with capacity appropriate to your report. With
AUTO_RESUMEenabled,USAGEpermits query-triggered resume;OPERATEis 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.comURL) 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
| Field | Where to get it |
|---|---|
| Account identifier | Snowsight UI → Admin → Accounts → copy the Account column value (preferred orgname-account_name form), or read it from your Snowflake web URL |
| Warehouse | Snowsight → Admin → Warehouses — copy the warehouse name |
| Database | Snowsight → Data → Databases — copy the database name |
| Role | The role you created above (e.g. DATARELIX_READER) |
| Schema | The schema you granted access to (e.g. PUBLIC) |
| Username | The approved existing user |
| Password | The 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 / region | Example | Notes |
|---|---|---|
| AWS US West (Oregon) | xy12345 | No region segment — legacy exception. |
| AWS, any other region | xy12345.us-east-2.aws | Region + .aws. |
| Azure, any region | xy12345.east-us-2.azure | Region + .azure. |
| GCP, any region | xy12345.us-central1.gcp | Region + .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_WAREHOUSEDatabase: YOUR_DATABASERole: DATARELIX_READERSchema: PUBLICUsername: datarelix_readerPassword: ••••••••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 toHAVINGfor window functions. - Timestamps —
TIMESTAMP_NTZ(no TZ),TIMESTAMP_LTZ(local),TIMESTAMP_TZ. - Semi-structured data —
VARIANT,OBJECT, andARRAYwithLATERAL FLATTENfor 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/UNIONper question. CTEs with multiple table references in a singleWITHclause are fine. - System schemas blocked —
INFORMATION_SCHEMAqueries are allowed only during discovery;ACCOUNT_USAGEis 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
| Symptom | Likely cause | Fix |
|---|---|---|
390100: Incorrect username or password | Bad credentials | Test from the Snowflake web UI first. |
Warehouse 'X' does not exist or not authorized | Role missing USAGE on warehouse | GRANT USAGE ON WAREHOUSE X TO ROLE Y. |
Warehouse is suspended | Auto-resume is disabled or warehouse use is not permitted | Check USAGE and AUTO_RESUME; ask an operator to resume it if manual action is required. |
Object does not exist on discovery | Role missing USAGE on database/schema | GRANT USAGE ON DATABASE/SCHEMA to the role. |
IP ... is not allowed to access Snowflake | Account network policy blocks the egress IP | Add Datarelix’s egress IPs to the account/user network policy allowed list. |
Statement timeout reached | Query exceeded the session timeout | Narrow the date range or source workload; a result LIMIT alone may not reduce compute. Contact support if needed. |
| Discovery returns 0 tables | Role lacks SELECT on the schema’s existing objects | GRANT 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