Overview
The Snowflake integration enables your agents to query and analyze data in your Snowflake data warehouse. Perfect for business intelligence, data analysis, and generating insights from your enterprise data while maintaining Snowflake’s security and performance standards.Features
- Enterprise SQL Queries: Execute any SQL query on your Snowflake warehouse
- Automatic Scaling: Warehouses scale based on query complexity
- Cost Optimization: Automatic warehouse suspension to control costs
- Clean Results: Structured, easy-to-read query results
- Advanced Analytics: Support for complex analytical queries and functions
- Secure Access: Enterprise-grade security and access controls
Prerequisites
- Active Snowflake account with data warehouse access
- User credentials with query permissions on target databases
- Warehouse name with sufficient compute resources
- Database and schema access rights for your data
- Network connectivity to Snowflake servers
Authentication
Aster connects to Snowflake with one of two methods:- Programmatic Access Token (PAT) — recommended. A scoped, expiring token tied to a Snowflake user. Best for service accounts: it avoids MFA/SSO prompts, can be restricted to a single read-only role, and is easy to rotate or revoke.
- Username & password. Supported, but discouraged for automation — passwords trigger MFA on many accounts and can’t be scoped or expired like a PAT.
Key-pair (private key) auth is not supported. Snowflake key-pair authentication uses a private key file — Aster does not accept one. If you have set up a key-pair, you do not need to send the private key; generate a PAT for the service user instead (covered below). The PAT is the only secret Aster needs.
What Aster needs
These are the exact fields on the Control Hub connection form. Everything except the secret is non-sensitive.| Field | Required | Example | Notes |
|---|---|---|---|
| Authentication Method | Yes | Programmatic Access Token | PAT or Username/Password |
| Account Identifier | Yes | ORGNAME-ACCOUNT_NAME | The orgname-account_name form (or locator.region, e.g. xy12345.us-east-1). Exclude .snowflakecomputing.com. Run the last line of the script below to get it. |
| Snowflake Username | Yes | ASTER_SVC | The service-account user |
| Programmatic Access Token | PAT auth | (the token secret) | The only secret. Required when auth method is PAT. |
| Snowflake Password | Password auth | (the password) | Required only when auth method is Username/Password |
| Default Warehouse | Yes | ASTER_WH | Warehouse Aster runs queries on |
| Default Database | Yes | ANALYTICS | Database the agent queries |
| Default Schema | Yes | PUBLIC | Schema within that database |
| Default Role | Yes | ASTER_RO | The least-privilege role the token is restricted to |
Setting up a service account (recommended)
Run this once in a Snowflake worksheet asACCOUNTADMIN. It creates a dedicated, read-only service user, a small dedicated warehouse, the grants Aster needs, and the PAT. Replace the YOUR_DATABASE placeholder (repeat the data grants for each database you want the agent to read).
A
TYPE = SERVICE user cannot have a password — it authenticates by PAT (or key-pair, which Aster doesn’t use). If you specifically want password auth, create a normal user instead and skip the PAT step.Snowflake does not use Aster’s fixed database-tool IPs. Aster’s Postgres and SQL Server tools connect from two static egress IPs you can allowlist; the Snowflake tool runs on a different backend without a fixed egress set, so allowlisting those IPs here will block the connection. Scope the network policy to the read-only service user instead, as shown above.
ASTER_SVC, Token = the token_secret from step 6, Warehouse = ASTER_WH, Database = YOUR_DATABASE, Schema, Role = ASTER_RO. Click Test Connection.
Sharing the credential securely
The PAT (or password) is the only secret involved — there is no private key to move.- Best: whoever provisions Snowflake enters the PAT directly into the Control Hub form themselves. Aster never needs it handed over.
- If Aster is setting up the connection for you: send the token through a secure channel — your organization’s encryption/secrets service or a one-time secret link (e.g. 1Password, Doppler, onetimesecret.com). Do not send it in plaintext email or chat.
- Because a PAT is scoped to a read-only role and has an expiry, it’s far safer to transmit than a password or private key — and you can revoke it instantly with
ALTER USER ASTER_SVC REMOVE PROGRAMMATIC ACCESS TOKEN ASTER_PAT.
Security Considerations
- Use a dedicated, read-only service account (the script above) rather than a personal or admin login
- Restrict the PAT to a least-privilege role with
ROLE_RESTRICTION, and grant that role only the databases/schemas the agent needs - Set an expiry on the PAT (
DAYS_TO_EXPIRY) and rotate it on a schedule - Use a small, auto-suspending warehouse to cap compute cost
- Monitor query history for the service user to audit agent activity
- Revoke instantly if needed by removing the token or disabling the user
Troubleshooting
Connection Timeout
Connection Timeout
- Verify your account identifier format (should not include .snowflakecomputing.com)
- Check network connectivity to Snowflake
- Confirm the warehouse exists and is available
- Validate you’re using the correct account region
Authentication Failed
Authentication Failed
- PAT rejected even though the token is correct? The most common cause: the service user isn’t subject to a network policy. Snowflake silently refuses PAT auth without one — apply
ASTER_SVC_NETPOLICYas shown in the setup script. - Confirm the PAT hasn’t expired or been removed, and that its
ROLE_RESTRICTIONmatches the Default Role on the connection - For password auth: verify the username/password and that the user isn’t blocked by MFA
- Check that the user account is active and not suspended
Query Execution Error
Query Execution Error
- Verify the warehouse has sufficient compute resources
- Check that you have permissions on the tables/views
- Confirm access to the database and schema
- Review query syntax and complexity
Related Tools
- Snowflake SQL - Execute SQL queries on your Snowflake warehouse
