Docs
Connections

Snowflake

Connect Snowflake with a key-pair service user and a SELECT-only role, how warehouse credits are used, and how column types map.

A Snowflake connection reads selected tables and views from one database. It uses the Snowflake SQL API over verified TLS, signs in with a key pair, and runs only Xentropy's own single SELECT, SHOW and DESCRIBE statements.

Availability

Snowflake is not yet generally available on xentropy.ai. Contact support@xentropy.ai to request access. Until it is enabled for your account, it does not appear in the engine list and its reads fail with PROVIDER_DISABLED.

Warehouse credits

Reads use Snowflake credits. Every read resumes the connection's warehouse, and Snowflake bills at least 60 seconds each time it resumes. Testing and saving a connection use metadata commands only (SHOW, DESCRIBE), which do not resume the warehouse. Use a dedicated XSMALL warehouse with AUTO_SUSPEND = 60, and cap it with a resource monitor. Scheduled refreshes count against your plan as for other sources.

Before you start

  • You need your account identifier, in the form orgname-account_name (for example acme-analytics). Legacy locators such as xy12345.eu-central-1 also work. Xentropy connects only to https://<account>.snowflakecomputing.com; you cannot enter a free URL.
  • If your account has a network policy, allow the egress IP addresses shown in the form. Private Link endpoints resolve to private addresses and are refused.
  • Snowflake is phasing out passwords for service users, so Xentropy signs in only with a key pair (an RSA key and a JWT for each request).

The form shows SQL for a read-only role, a small warehouse and a service user, filled in with the values you enter:

USE ROLE SECURITYADMIN;
CREATE ROLE IF NOT EXISTS XENTROPY_READER;
USE ROLE SYSADMIN;
CREATE WAREHOUSE IF NOT EXISTS XENTROPY_WH WAREHOUSE_SIZE = XSMALL AUTO_SUSPEND = 60 AUTO_RESUME = TRUE INITIALLY_SUSPENDED = TRUE;
GRANT USAGE ON WAREHOUSE XENTROPY_WH TO ROLE XENTROPY_READER;
GRANT USAGE ON DATABASE YOUR_DATABASE TO ROLE XENTROPY_READER;
GRANT USAGE ON ALL SCHEMAS IN DATABASE YOUR_DATABASE TO ROLE XENTROPY_READER;
GRANT SELECT ON ALL TABLES IN DATABASE YOUR_DATABASE TO ROLE XENTROPY_READER;
GRANT SELECT ON ALL VIEWS IN DATABASE YOUR_DATABASE TO ROLE XENTROPY_READER;
-- Future objects (needs SECURITYADMIN or MANAGE GRANTS):
GRANT USAGE ON FUTURE SCHEMAS IN DATABASE YOUR_DATABASE TO ROLE XENTROPY_READER;
GRANT SELECT ON FUTURE TABLES IN DATABASE YOUR_DATABASE TO ROLE XENTROPY_READER;
GRANT SELECT ON FUTURE VIEWS IN DATABASE YOUR_DATABASE TO ROLE XENTROPY_READER;
USE ROLE SECURITYADMIN;
CREATE USER IF NOT EXISTS XENTROPY_SVC TYPE = SERVICE DEFAULT_ROLE = XENTROPY_READER DEFAULT_WAREHOUSE = XENTROPY_WH;
GRANT ROLE XENTROPY_READER TO USER XENTROPY_SVC;
ALTER USER XENTROPY_SVC SET RSA_PUBLIC_KEY = '<public key>';
-- Optional, as ACCOUNTADMIN: cap the warehouse's monthly credits.
-- CREATE RESOURCE MONITOR XENTROPY_MONITOR WITH CREDIT_QUOTA = 10 TRIGGERS ON 100 PERCENT DO SUSPEND;
-- ALTER WAREHOUSE XENTROPY_WH SET RESOURCE_MONITOR = XENTROPY_MONITOR;

Key pair

In the form, choose Generate key pair. Your browser creates an RSA 2048-bit key pair. The private key never leaves the page except in the Test and Save requests, and it is not kept in browser storage.
Copy the ALTER USER … SET RSA_PUBLIC_KEY = '…' statement with Copy ALTER USER statement, and run it in Snowflake as a user administrator.
Test the connection. Until the statement has run, Test fails at the Authentication stage.

You can paste an existing private key instead, as a PKCS#8 PEM file, either unencrypted or encrypted with a passphrase that you enter alongside it. The private key is encrypted at rest like a password and never returned. Reloading the page forgets a generated key; generate a new one and run the new ALTER USER statement.

Set up the connection

Open Connections, choose New connection, then Database, and choose Snowflake as the engine.
Name the connection. Optionally paste your account URL (https://<account>.snowflakecomputing.com) and choose Fill fields.
Enter the account identifier, user, role, warehouse and database, and create or paste the key (see Key pair).
Set the time zone that your TIMESTAMP_NTZ values are written in (default UTC).
Choose Test and list relations, select the relations to read (up to 100), then choose Save connection.

Relations are listed as schema.table in the connection's database, with their exact case. Discovery runs SHOW TERSE OBJECTS IN DATABASE, which shows only what the role can see, excluding INFORMATION_SCHEMA, up to 500. When you save, Xentropy probes every selected relation with DESCRIBE TABLE.

To type a relation instead, write schema.table. Quote a name that has a dot, comma or space, as in PUBLIC."sales.2024". Names cannot contain a double quote.

TLS

Xentropy connects to <account>.snowflakecomputing.com over HTTPS and verifies Snowflake's public certificate. Every request is pinned to the address that passed the network check, and only the SQL API's statement endpoints can be called.

How reads stay read-only

Snowflake has no read-only transaction. Instead:

  • Only statements that Xentropy generates are sent: SELECT … LIMIT 50001, and fixed SHOW and DESCRIBE commands. Values are bound parameters.
  • Every request allows exactly one statement (MULTI_STATEMENT_COUNT = 1).
  • The role you grant has only USAGE and SELECT.

Type mapping

Snowflake typeDataset type
NUMBER with scale 0 and precision up to 15number
Other NUMBER (including INT, which is NUMBER(38,0))decimal (exact, as text)
FLOATnumber
BOOLEANboolean
DATEdate
TIMESTAMP_LTZ, TIMESTAMP_TZdatetime (UTC)
TIMESTAMP_NTZdatetime, read in the connection's time zone and returned in UTC
TIME, VARCHARstring
VARIANT, OBJECT, ARRAYFlattened. A column whose values are all objects becomes dotted fields (up to 4 levels). Lists and mixed values stay one field, as JSON text
BINARY, GEOGRAPHY, GEOMETRY, VECTORexcluded

Snowflake does not enforce constraints. Declared primary and unique keys set the order and grain, marked as not verified. Declared foreign keys to other selected relations become relationships.

Limits

LimitValue
Rows per read50,000
Data per read5 MiB
Readable fields100, including flattened fields
Statement budget25 s (server-side timeout; the statement is cancelled)
Read deadline30 s
Metadata and verification statements10 s
Relations listed / selected500 / 100

An agent reads a Snowflake connection with connections:read or snowflake:read.

Errors

Test reports the first stage that fails. The form labels the stage, for example Authentication check failed. The warehouse is checked only by reads, and the form labels that stage Compute warehouse.

CodeCauseWhat to do
SNOWFLAKE_DNSThe account identifier does not resolveCheck the identifier (orgname-account_name)
SNOWFLAKE_NETWORK_POLICYThe account host resolves to a private or reserved address, for example Private Link (403)Use the public account URL
SNOWFLAKE_TCPSnowflake could not be reached, or the request timed out (503)Retry later
SNOWFLAKE_TLSThe certificate for the account host could not be verifiedCheck the account identifier
SNOWFLAKE_AUTHThe key is not registered for the user, the user is unknown, or the role or database is not grantedRun the ALTER USER statement, and check the user, role and database
SNOWFLAKE_PERMISSIONA selected table does not exist or the role cannot read itGrant SELECT, or deselect it
SNOWFLAKE_WAREHOUSEThe warehouse does not exist, is suspended by a resource monitor, or the role has no USAGE on itGrant USAGE, or resume the warehouse or raise its quota
INCOMPLETE_DATAThe relation has more than 50,000 rows, or exceeds 5 MiBSelect a bounded view
LIMIT_EXCEEDEDMore than 100 readable fieldsSelect a view with fewer columns
BUDGET_EXCEEDEDThe query ran past its 25 s statement budgetSelect a smaller view, or a larger warehouse
PROVIDER_UNAVAILABLEThe metadata read or the read failed for another reasonRetry later, then check connection health

On this page