This guide connects Snowflake to Klairr. The connection uses the SQL API v2 over HTTPS with a dedicated read-only role — Klairr never has write access to your data and never requires a native Node driver on your side.
Prerequisites
- A Snowflake account, including the region segment (e.g.
xy12345.us-east-1). - An admin who can
CREATE ROLEandGRANTprivileges (typicallySECURITYADMINorACCOUNTADMIN). - A virtual warehouse Klairr can
USEfor queries. - Snowflake Standard, Enterprise, or Business Critical edition. (Standard supports password auth; key-pair auth requires Enterprise+.)
Choose a connection method
| Method | When to use |
|---|---|
| Public endpoint (default) | Standard Snowflake account with no network policy restrictions, or a network policy that allowlists Klairr’s egress IPs. |
| Network policy with allowlist | You restrict Snowflake access by IP. Add Klairr’s egress range to the network policy. See Network Access for the current range. |
| AWS PrivateLink / Azure Private Link / GCP PSC | Snowflake account is configured with private connectivity and you want to keep traffic off the public internet. Available on Business Critical. Contact support to provision. |
Choose an authentication method
| Method | When to use |
|---|---|
| Password (default, v1) | Quickest setup. Stored encrypted; rotated per your org’s policy. |
| Key-pair (recommended for production) | The Snowflake-native path for service accounts. Klairr stores the private key encrypted at rest; the public key is registered on the user. Available on Enterprise+. |
The setup form today exposes password auth; key-pair auth is provisioned via support during onboarding for production rollouts. Documenting the path here so you can plan the production cutover from day one.
Step 1: Provision a read-only role
Run as SECURITYADMIN (or another role that can manage roles + grants):
USE ROLE SECURITYADMIN;
-- Role.
CREATE ROLE ANALYTICS_READ_ONLY;
-- Compute.
GRANT USAGE ON WAREHOUSE ANALYTICS_WH TO ROLE ANALYTICS_READ_ONLY;
-- Catalogue access.
GRANT USAGE ON DATABASE ANALYTICS TO ROLE ANALYTICS_READ_ONLY;
GRANT USAGE ON SCHEMA ANALYTICS.PUBLIC TO ROLE ANALYTICS_READ_ONLY;
-- Read on existing + future tables and views.
GRANT SELECT ON ALL TABLES IN SCHEMA ANALYTICS.PUBLIC TO ROLE ANALYTICS_READ_ONLY;
GRANT SELECT ON ALL VIEWS IN SCHEMA ANALYTICS.PUBLIC TO ROLE ANALYTICS_READ_ONLY;
GRANT SELECT ON FUTURE TABLES IN SCHEMA ANALYTICS.PUBLIC TO ROLE ANALYTICS_READ_ONLY;
GRANT SELECT ON FUTURE VIEWS IN SCHEMA ANALYTICS.PUBLIC TO ROLE ANALYTICS_READ_ONLY;
-- User.
CREATE USER KLAIRR_READER
PASSWORD = '<password>'
DEFAULT_ROLE = ANALYTICS_READ_ONLY
DEFAULT_WAREHOUSE = ANALYTICS_WH;
GRANT ROLE ANALYTICS_READ_ONLY TO USER KLAIRR_READER;
The role gets USAGE on warehouse + database + schema and SELECT on tables and views — the minimum surface for read-only analytics. Klairr does not request OPERATE, MODIFY, CREATE, OWNERSHIP, IMPORTED PRIVILEGES, or admin grants.
If you can’t provision a strict read-only role, see “Allow writable role” below.
Step 2: (Recommended) Restrict the role’s network access
Snowflake network policies attach to a user OR a role. Restricting to Klairr’s egress range is one extra line of defence:
USE ROLE SECURITYADMIN;
CREATE NETWORK POLICY KLAIRR_EGRESS
ALLOWED_IP_LIST = ('<klairr egress range — see Network Access>');
ALTER USER KLAIRR_READER SET NETWORK_POLICY = KLAIRR_EGRESS;
Step 3: Add the connector in Klairr
Open Settings → Connectors → Add connector, pick Snowflake, and enter:
| Field | Example | Notes |
|---|---|---|
| Account identifier | xy12345.us-east-1 | Includes region. Find it in the Snowflake URL (xy12345.us-east-1.snowflakecomputing.com). |
| Username | KLAIRR_READER | The user from Step 1. |
| Password | … | Stored encrypted; never logged. |
| Role | ANALYTICS_READ_ONLY | The role the user assumes for every query. |
| Warehouse | ANALYTICS_WH | The warehouse Klairr runs queries on. |
| Database | ANALYTICS | The database Klairr should query. |
| Schema | PUBLIC | The schema within the database. |
Setup tests
When you click Connect, Klairr runs the following checks. Each failure maps to the troubleshooting entry below.
- Account identifier shape — the
<account>.<region>form parses correctly. - Authentication — the user can log in with the supplied password.
- Role assumption — the user has been granted the role and can
USE ROLE. - Warehouse + database + schema reachable — the role has
USAGEon each. - Read access — the role can
SELECTfrom at least one table or view in the schema. - Write probe — Klairr submits a no-op write attempt to confirm rejection.
- Schema introspection — Klairr enumerates tables and columns from
INFORMATION_SCHEMA.
What Klairr queries
- Schema introspection runs against
INFORMATION_SCHEMA.TABLES,.COLUMNS, and.VIEWS— no row data leaves your warehouse during introspection. - Question answering issues plain
SELECTstatements with a server-enforcedLIMIT. Every emitted query is validated against an allow-list before execution: stage operations (COPY INTO,PUT,GET,REMOVE,LIST,UNLOAD), pipes, tasks, procedures, streams,EXECUTE IMMEDIATE, and any DML are rejected at the application layer. - Snowflake bills credits per query. Klairr defaults to a 1-hour query-result cache for Snowflake connectors to keep credit consumption predictable.
Allow writable role
Same opt-in available on every database connector — set “Allow writable role” to “Yes” if your role can write and you can’t narrow it. Klairr’s executor only emits SELECT; the connect-time probe is belt-and-braces. The acknowledgement is recorded on the connector.
Troubleshooting
- Account identifier rejected — Snowflake account identifiers must include the region (
xy12345.us-east-1), not just the account locator. Find the correct form in your Snowflake URL. - Authentication failed — the user doesn’t exist, the password is wrong, or a network policy is blocking Klairr. Confirm in Snowflake’s web UI from a workstation that has the same egress IP, or check
LOGIN_HISTORYfor the failure reason. - Role unauthorized — the user wasn’t granted the role. Re-run
GRANT ROLE … TO USER …. - Warehouse not found / no usage privilege — the role is missing
USAGEon the warehouse. Re-run theGRANT USAGE ON WAREHOUSEstatement. - Permission denied on table — the role is missing
SELECTon at least one table. Re-runGRANT SELECT ON ALL TABLESandGRANT SELECT ON FUTURE TABLES. - “Credentials grant write access” — the role has
MODIFYorINSERT/UPDATE/DELETE. Either narrow the role, or set “Allow writable role” to Yes.
Related
- Network Access — egress IPs, private-link options, TLS requirements.
- Roles & Permissions — workspace-level access controls.
- Supported Data Sources — every database and SaaS Klairr connects to.
- Security & Data Handling — encryption, logging, what we do and don’t store.