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 exampleacme-analytics). Legacy locators such asxy12345.eu-central-1also work. Xentropy connects only tohttps://<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
ALTER USER … SET RSA_PUBLIC_KEY = '…' statement with Copy ALTER USER statement, and run it in Snowflake as a user administrator.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
https://<account>.snowflakecomputing.com) and choose Fill fields.TIMESTAMP_NTZ values are written in (default UTC).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 fixedSHOWandDESCRIBEcommands. Values are bound parameters. - Every request allows exactly one statement (
MULTI_STATEMENT_COUNT = 1). - The role you grant has only
USAGEandSELECT.
Type mapping
| Snowflake type | Dataset type |
|---|---|
NUMBER with scale 0 and precision up to 15 | number |
Other NUMBER (including INT, which is NUMBER(38,0)) | decimal (exact, as text) |
FLOAT | number |
BOOLEAN | boolean |
DATE | date |
TIMESTAMP_LTZ, TIMESTAMP_TZ | datetime (UTC) |
TIMESTAMP_NTZ | datetime, read in the connection's time zone and returned in UTC |
TIME, VARCHAR | string |
VARIANT, OBJECT, ARRAY | Flattened. 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, VECTOR | excluded |
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
| Limit | Value |
|---|---|
| Rows per read | 50,000 |
| Data per read | 5 MiB |
| Readable fields | 100, including flattened fields |
| Statement budget | 25 s (server-side timeout; the statement is cancelled) |
| Read deadline | 30 s |
| Metadata and verification statements | 10 s |
| Relations listed / selected | 500 / 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.
| Code | Cause | What to do |
|---|---|---|
SNOWFLAKE_DNS | The account identifier does not resolve | Check the identifier (orgname-account_name) |
SNOWFLAKE_NETWORK_POLICY | The account host resolves to a private or reserved address, for example Private Link (403) | Use the public account URL |
SNOWFLAKE_TCP | Snowflake could not be reached, or the request timed out (503) | Retry later |
SNOWFLAKE_TLS | The certificate for the account host could not be verified | Check the account identifier |
SNOWFLAKE_AUTH | The key is not registered for the user, the user is unknown, or the role or database is not granted | Run the ALTER USER statement, and check the user, role and database |
SNOWFLAKE_PERMISSION | A selected table does not exist or the role cannot read it | Grant SELECT, or deselect it |
SNOWFLAKE_WAREHOUSE | The warehouse does not exist, is suspended by a resource monitor, or the role has no USAGE on it | Grant USAGE, or resume the warehouse or raise its quota |
INCOMPLETE_DATA | The relation has more than 50,000 rows, or exceeds 5 MiB | Select a bounded view |
LIMIT_EXCEEDED | More than 100 readable fields | Select a view with fewer columns |
BUDGET_EXCEEDED | The query ran past its 25 s statement budget | Select a smaller view, or a larger warehouse |
PROVIDER_UNAVAILABLE | The metadata read or the read failed for another reason | Retry later, then check connection health |
SQL Server
Connect SQL Server 2017+, Azure SQL Database or Azure SQL Managed Instance over verified TLS, with a SQL login or a Microsoft Entra ID service principal.
Google BigQuery
Connect BigQuery with a read-only service account key, read tables at no query cost, and run SELECT queries under a dry-run estimate and a hard cost cap.