DocsIntegrations

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

CapabilityValue
Provider IDsnowflake
Auth kindapi_key
Connect flowInline Programmatic Access Token (PAT) or Key-Pair RS256 JWT
ActionsYes
EventsNo
Webhook deliveryNo
Event samplesNo
Live statusYes

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 example acme-prod)
  • Legacy locator format: locator.region or locator.region.cloud (for example xy12345.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.

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;

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.

  1. 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
  2. Strip the PEM header/footer lines from rsa_key.pub and assign the base64 body to your Snowflake user:
    ALTER USER MOBIUS_SVC SET RSA_PUBLIC_KEY = '<single-line-base64-public-key>';
  3. 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 = SERVICE and TYPE = PERSON users authenticating with a PAT (TYPE = SERVICE_AGENT users do not require one). If your Snowflake account blocks PATs without a static IP allowlist, use Key-Pair (RS256 JWT) instead.

SurfaceSupport
AppOpen Settings > Connected accounts, choose Snowflake, and submit your account identifier and PAT or RSA key pair.
CLIInspect actions with mobius catalog get-action snowflake.query.
APICall 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
ActionModeWhat it does
snowflake.queryRead-onlyRuns 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.statusRead-onlyChecks an async statement_handle and fetches a specific zero-based result partition (gzip-compressed over the wire).
snowflake.statement.cancelNon-destructive writeCancels a running Snowflake statement by statement_handle. Prompts only when approval mode is set to writes.
snowflake.databases.listRead-onlyLists accessible databases via REST metadata API without waking a virtual warehouse.
snowflake.schemas.listRead-onlyLists schemas in a database (defaults to the connection's database) without waking compute.
snowflake.tables.listRead-onlyLists tables and approximate row/byte counts in a schema without waking compute.
snowflake.table.describeRead-onlyReturns column names, SQL data types, nullability, defaults, and constraints for a table without waking compute.
snowflake.executeDestructiveRuns 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, and snowflake.table.describe call 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_seconds return pending: true with a statement_handle. Pass that handle to snowflake.statement.status to fetch results once ready (cached in Snowflake for 24 hours) or to snowflake.statement.cancel to stop execution.
  • Typed cells: Mobius decodes Snowflake's stringified result cells using resultSetMetaData.rowType — integers to numbers, fixed-point decimals with scale > 0 to exact decimal strings, booleans to booleans, DATE values to YYYY-MM-DD, TIMESTAMP_* values to RFC 3339 strings, and SQL NULL to null.

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_AGENT user.
  • If the PAT was created with ROLE_RESTRICTION, ensure the connection's configured Role (and any per-call role override) 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.execute in actions.
  • Schedule recurring warehouse reporting or reconciliation in routines and store structured snapshots in tables.