Snowflake
Snowflake lets Mobius assistants browse databases, schemas, and tables without waking compute, run read-only SQL queries, and execute approval-gated SQL statements.
A Snowflake integration connects your Snowflake data warehouse directly to Mobius over the Snowflake SQL REST API v2 and REST Resource API v2. Assistants can inspect databases, schemas, tables, and column definitions at zero compute cost, run bounded read-only SQL queries with automatic asynchronous polling, and run single DML or DDL statements behind human approval.
Capability map
| Capability | Value |
|---|---|
| Provider ID | snowflake |
| Auth kind | api_key |
| Connect flow | Inline Programmatic Access Token (PAT) or Key-Pair RS256 JWT |
| Actions | Yes |
| Events | No |
| Webhook delivery | No |
| Event samples | No |
| Live status | Yes |
Connect Snowflake
In line with Snowflake's MFA enforcement retiring single-factor passwords, Mobius never accepts username/password credentials. Connect using either Key-Pair (RS256 JWT) or a Programmatic Access Token (PAT).
Account identifier format
Enter only your Snowflake account identifier, not a full URL or
.snowflakecomputing.com hostname:
- Organization-account format (recommended):
orgname-accountname(for exampleacme-prod) - Legacy locator format:
locator.regionorlocator.region.cloud(for examplexy12345.us-east-1.aws)
Mobius strictly validates the identifier and connects only over HTTPS to
https://<account_identifier>.snowflakecomputing.com using public-IP-only
egress. PrivateLink hostnames are not supported.
Recommended least-privilege role setup
Create a dedicated read-only role and service user in Snowflake so RBAC enforces your primary data boundary:
CREATE ROLE IF NOT EXISTS MOBIUS_READONLY;
GRANT USAGE ON WAREHOUSE WH_ANALYTICS_XS TO ROLE MOBIUS_READONLY;
GRANT USAGE ON DATABASE ANALYTICS TO ROLE MOBIUS_READONLY;
GRANT USAGE ON SCHEMA ANALYTICS.PUBLIC TO ROLE MOBIUS_READONLY;
GRANT SELECT ON ALL TABLES IN SCHEMA ANALYTICS.PUBLIC TO ROLE MOBIUS_READONLY;
GRANT SELECT ON FUTURE TABLES IN SCHEMA ANALYTICS.PUBLIC TO ROLE MOBIUS_READONLY;
CREATE USER IF NOT EXISTS MOBIUS_SVC
TYPE = SERVICE
DEFAULT_ROLE = MOBIUS_READONLY
DEFAULT_WAREHOUSE = WH_ANALYTICS_XS;
GRANT ROLE MOBIUS_READONLY TO USER MOBIUS_SVC;Option 1: Key-Pair RS256 JWT (recommended for production and routines)
Key-Pair authentication works for TYPE = SERVICE accounts without requiring a
Snowflake network policy for dynamic cloud egress IPs, and supports
zero-downtime key rotation via RSA_PUBLIC_KEY and RSA_PUBLIC_KEY_2.
- Generate an unencrypted 2048-bit PKCS#8 RSA key pair:
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub - Strip the PEM header/footer lines from
rsa_key.puband assign the base64 body to your Snowflake user:ALTER USER MOBIUS_SVC SET RSA_PUBLIC_KEY = '<single-line-base64-public-key>'; - In Mobius, open Settings > Connected accounts, choose Snowflake, set
Auth method to
keypair, enter your Account identifier, Username (MOBIUS_SVC), RSA Private Key PEM, and optional default Role, Warehouse, Database, and Schema.
Mobius mints short-lived RS256 JWTs (exp <= 59 minutes) locally from your
encrypted private key and caches them in memory with automatic refresh.
Option 2: Programmatic Access Token (PAT)
PATs provide a drop-in Bearer token with an explicit expiration (up to 365 days)
and optional ROLE_RESTRICTION:
ALTER USER MOBIUS_SVC ADD PROGRAMMATIC ACCESS TOKEN mobius_prod
DAYS_TO_EXPIRY = 90
ROLE_RESTRICTION = 'MOBIUS_READONLY';Network policy caveat: Snowflake requires an active network policy for
TYPE = SERVICEandTYPE = PERSONusers authenticating with a PAT (TYPE = SERVICE_AGENTusers do not require one). If your Snowflake account blocks PATs without a static IP allowlist, use Key-Pair (RS256 JWT) instead.
| Surface | Support |
|---|---|
| App | Open Settings > Connected accounts, choose Snowflake, and submit your account identifier and PAT or RSA key pair. |
| CLI | Inspect actions with mobius catalog get-action snowflake.query. |
| API | Call POST /v1/integrations with provider snowflake and credentials of { "account_identifier", "auth_method?", "pat?", "username?", "private_key_pem?", "warehouse?", "database?", "schema?", "role?" }. |
Mobius validates credentials live via GET /api/v2/databases?showLimit=1 so
connecting and health checks never resume a virtual warehouse or spend compute
credits. Secrets (pat and private_key_pem) are stored encrypted at rest and
never placed in plaintext connection config. Because Snowflake connections are
capability-scoped, an organization can connect multiple role or warehouse
profiles (for example read-only analytics vs. ETL) against the same Snowflake
account and grant each profile separately under Assistant access.
Actions
snowflake.query
snowflake.statement.status
snowflake.statement.cancel
snowflake.databases.list
snowflake.schemas.list
snowflake.tables.list
snowflake.table.describe
snowflake.execute| Action | Mode | What it does |
|---|---|---|
snowflake.query | Read-only | Runs a guarded read-only SQL query (SELECT, WITH, SHOW, DESCRIBE, DESC, EXPLAIN; rejects mutating keywords and SYSTEM$ functions; enforce a read-only Snowflake role as the primary server-side boundary). Polls async 202 handles up to wait_seconds (default 20s, max 45s) and caps rows (default 200, max 1000) and response size (< 48 KiB). |
snowflake.statement.status | Read-only | Checks an async statement_handle and fetches a specific zero-based result partition (gzip-compressed over the wire). |
snowflake.statement.cancel | Non-destructive write | Cancels a running Snowflake statement by statement_handle. Prompts only when approval mode is set to writes. |
snowflake.databases.list | Read-only | Lists accessible databases via REST metadata API without waking a virtual warehouse. |
snowflake.schemas.list | Read-only | Lists schemas in a database (defaults to the connection's database) without waking compute. |
snowflake.tables.list | Read-only | Lists tables and approximate row/byte counts in a schema without waking compute. |
snowflake.table.describe | Read-only | Returns column names, SQL data types, nullability, defaults, and constraints for a table without waking compute. |
snowflake.execute | Destructive | Runs a single DML or DDL statement (INSERT, UPDATE, DELETE, MERGE, CREATE, ALTER, DROP, COPY) with no automatic retries. Assistants set to ask before destructive calls request human approval first. |
Async queries, partitions, and cost control
- Zero-compute discovery:
snowflake.databases.list,snowflake.schemas.list,snowflake.tables.list, andsnowflake.table.describecall Snowflake's REST Resource API v2 and never resume a suspended virtual warehouse. - 45-second synchronous cutoff: Queries that take longer than Snowflake's
synchronous window or
wait_secondsreturnpending: truewith astatement_handle. Pass that handle tosnowflake.statement.statusto fetch results once ready (cached in Snowflake for 24 hours) or tosnowflake.statement.cancelto stop execution. - Typed cells: Mobius decodes Snowflake's stringified result cells using
resultSetMetaData.rowType— integers to numbers, fixed-point decimals with scale> 0to exact decimal strings, booleans to booleans,DATEvalues toYYYY-MM-DD,TIMESTAMP_*values to RFC 3339 strings, and SQLNULLtonull.
Troubleshooting
"Snowflake rejected these credentials (390144)" in Key-Pair mode
- Confirm the Username matches the Snowflake user's login name and that you
assigned the matching public key via
ALTER USER <name> SET RSA_PUBLIC_KEY = '...'with the header/footer lines removed. - Confirm the Account identifier matches your organization-account name
(
orgname-accountname) or legacy locator (xy12345.us-east-1.aws). - Ensure the private key is an unencrypted PKCS#8 or PKCS#1 RSA PEM key.
PAT fails with network policy or role restriction errors
- If Snowflake requires a network policy for your PAT user type, switch the
connection to Key-Pair (RS256 JWT) or use a
TYPE = SERVICE_AGENTuser. - If the PAT was created with
ROLE_RESTRICTION, ensure the connection's configured Role (and any per-callroleoverride) is permitted by that restriction.
SQL REST API statement limitations
- Multi-statement SQL scripts (
;separating multiple statements) and stage file commands (PUT/GET) are rejected. Submit one SQL statement per tool call.
Next
- Connect and grant accounts to assistants in Connect accounts.
- Control approval prompts for
snowflake.executein actions. - Schedule recurring warehouse reporting or reconciliation in routines and store structured snapshots in tables.