Connecting to Snowflake
This guide connects Astrato to a Snowflake account. When you finish, the connection appears in Data & AI → Data Connections and you can build a semantic layer on it. The steps are the same form described in Data connections; this page adds what is specific to Snowflake. It describes the current lobby, although it keeps its Help Center address.
Before you start
Section titled “Before you start”Before you start: check each of these. Most failed validations come from one of them.
- Astrato permission. You need a workspace role that can create data connections: Owner, Admin or Creator. The account menu, your profile picture at the top right, shows your role under your name. If New connection is missing from Data & AI → Data Connections, ask a workspace administrator (see How access works).
- Your account URL. In Snowsight, open the account menu and use Copy account URL. Either
form works:
ab12345.eu-west-2.aws.snowflakecomputing.com(account locator) ormyorg-myaccount.snowflakecomputing.com(organization and account name). A leadinghttps://is accepted. - A Snowflake user and role that can use a warehouse and read the data you want. See Role and privileges.
- Network access. If your Snowflake account or user has a network policy, Astrato’s addresses must be allowed. See Network policy.
- A credential for the authentication method you choose. See Choose an authentication method. If you are not a Snowflake administrator, see If you are not a Snowflake administrator.
If the account URL you copied is rejected, run this in a Snowflake worksheet. It lists the host
names your account answers on; the SNOWFLAKE_DEPLOYMENT and SNOWFLAKE_DEPLOYMENT_REGIONLESS
rows are the two forms of the account URL.
-- List the host names for this Snowflake accountSELECT t.value:type::varchar AS type, t.value:host::varchar AS host, t.value:port AS portFROM TABLE(FLATTEN(input => PARSE_JSON(SYSTEM$ALLOWLIST()))) AS tWHERE t.value:type::varchar LIKE 'SNOWFLAKE%';Choose an authentication method
Section titled “Choose an authentication method”The Authentication section offers three methods, in this order:
| Method | Choose it when | What you enter |
|---|---|---|
| Private key (Recommended) | You connect as a service user, or your account enforces multi-factor authentication. Snowflake is moving accounts away from passwords. | Username and Private key, then Account URL |
| Sign in with Snowflake | Each person should query with their own Snowflake identity. An administrator first sets up an access integration. | An OAuth connection, then Sign in |
| Password (legacy) | You are testing, or your account still allows password sign-in for this user. Users with multi-factor authentication cannot use it. | Username and Password, then Account URL |
You do not need a key pair already. With Private key (Recommended) selected, Generate key pair beside the field creates one in your browser and fills in the private key. Below it, Astrato shows the statement to run in Snowflake, headed “Run this in Snowflake to accept the key, then validate.”, with a Copy button. The statement has this shape:
ALTER USER <username> SET RSA_PUBLIC_KEY_2='<public key>'
It uses Snowflake’s second key slot, so a key already in the first slot keeps working. Running it needs a role that can alter the user, such as SECURITYADMIN. The statement names the Username you entered and updates if you change it. If your browser cannot generate the key, Astrato says so; paste an existing private key instead. For a full service-user setup, see Snowflake key-pair authentication and Snowflake MFA.
If you are not a Snowflake administrator
Section titled “If you are not a Snowflake administrator”You can still use Private key (Recommended) without a role that can alter users. The statement Astrato shows holds only the public half of the key, which is safe to send to someone else; the private key stays in your browser until you validate.
- Fill in Username, select Generate key pair, and select Copy beside the statement.
- Send the statement to whoever administers Snowflake users, and ask them to run it. If the user does not exist yet, ask them to create it with the role in Role and privileges at the same time.
- Keep the New Snowflake connection panel open while you wait. The generated private key exists only in that panel: if you close it, generate a new pair and send the new statement.
- When they confirm, paste the Account URL and select Validate Connection.
If your account has a network policy, the same person can add Astrato’s addresses; see Network policy. If your workspace already has a verified Snowflake access integration, Sign in with Snowflake needs no key at all: you sign in as yourself.
Create the connection
Section titled “Create the connection”-
Open Data & AI → Data Connections and select New connection.

-
Select Snowflake. The panel title changes to New Snowflake connection.
-
Under Authentication, choose a method from the list (see Choose an authentication method) and fill in its fields. For Sign in with Snowflake, choose the OAuth connection and select Sign in, then complete sign-in in the window that opens.

-
Under Connection details, paste the Account URL. If your workspace shows Deployment Region, you can leave it unset for now. Once selected, validation and source discovery go through that region, and a Data App cannot be published on this connection until one is selected. See Choose a Deployment Region.
-
Select Validate Connection. It stays unavailable while a required field is empty, and the form lists those fields after “Still needed:”.

-
With Private key (Recommended) or Password (legacy), choose a Warehouse under Session; if the user has a default warehouse, it is already chosen. The warehouse is required before you can save. Role is optional; if you do not choose one, the user’s default role is used.
With Sign in with Snowflake, Role and Warehouse both read User default and cannot be changed: each person who uses the connection queries with their own Snowflake user’s default role and warehouse. To set them for everyone instead, select Advanced beside the Session heading and choose them. Clearing Advanced returns both to User default.
-
Under Data to use, choose the Database. Schema stays at (Default) until the connection is saved; you can choose one in step 10.

-
Under Name, the suggested Connection name is
Snowflake. Change it to something people will recognise, such as the database’s name. -
Select Save connection.
-
The panel shows Connection created with “Choose a schema now, or finish to use this connection.” Choose a schema or leave it as Choose later, then select Finish.
What success looks like
Section titled “What success looks like”- After step 5, a Validation result section says “Connected to Snowflake in n ms.”, and the Session and Data to use lists fill in. Before that, they read “Available once the connection validates.” With Sign in with Snowflake, Session stays at User default unless you select Advanced.
- The Database list shows only the databases the user’s role can see. If it is empty, the role has no access; see Role and privileges.
- After Finish, the connection is in the Data Connections list with its name, source, connection details and Deployment Region.
To confirm that the connection can read your tables before you model them, start an empty semantic layer on it and open Add → Tables & Views; see Check that it works.
If validation fails, see When a data connection will not validate.
Role and privileges
Section titled “Role and privileges”Astrato reads Snowflake with the role you pick under Session (or the user’s default role). That role needs to use a warehouse and read the databases, schemas and tables you will model. This is a typical read-only setup in Snowflake’s own access control; rename the objects to match yours and follow your own security policy:
USE ROLE SECURITYADMIN;
CREATE ROLE IF NOT EXISTS ASTRATO_READER;GRANT USAGE ON WAREHOUSE ANALYTICS_WH TO ROLE ASTRATO_READER;GRANT USAGE ON DATABASE SALES TO ROLE ASTRATO_READER;GRANT USAGE ON ALL SCHEMAS IN DATABASE SALES TO ROLE ASTRATO_READER;GRANT SELECT ON ALL TABLES IN DATABASE SALES TO ROLE ASTRATO_READER;GRANT SELECT ON ALL VIEWS IN DATABASE SALES TO ROLE ASTRATO_READER;
GRANT ROLE ASTRATO_READER TO USER ASTRATO_SERVICE;ALTER USER ASTRATO_SERVICE SET DEFAULT_ROLE = ASTRATO_READER DEFAULT_WAREHOUSE = ANALYTICS_WH;ALL TABLES and ALL VIEWS cover only objects that exist now. For tables created later, add
GRANT SELECT ON FUTURE TABLES IN DATABASE SALES TO ROLE ASTRATO_READER; and the same for views.
Writing data back from Astrato needs more than SELECT; see Writeback.
Network policy
Section titled “Network policy”If your Snowflake account or the connecting user has a network policy, Snowflake refuses connections from addresses that are not on it, and Validate Connection fails.
- With a Deployment Region selected, the form names that region’s addresses under the region, as “Allow traffic from … at your database.” Allow those addresses.
- Without a Deployment Region (Legacy / not selected), allow Astrato’s addresses
34.142.11.11and34.142.68.232.
Changing a network policy needs a Snowflake administrator. If that is not you, send them the
addresses above. To add them, they edit the policy, for example with
ALTER NETWORK POLICY <policy> SET ALLOWED_IP_LIST = (...). SET replaces the whole list, so
include the addresses already on it. For a private network path instead, see
AWS PrivateLink.
Set up Sign in with Snowflake
Section titled “Set up Sign in with Snowflake”Sign in with Snowflake needs an access integration: a Snowflake OAuth security integration, registered in Astrato. A workspace owner or administrator sets it up once; after that, each person who creates or uses the connection signs in to Snowflake as themselves.
Before you start: you need the Owner or Administrator workspace role in Astrato, and a Snowflake role that can create security integrations, such as ACCOUNTADMIN.
-
In Astrato, open Administration → Enterprise Connection, select the Access integrations tab and select Add integration.
-
Under Select a Data provider, choose Snowflake from the Provider list. The Configuration tab lists what the Snowflake side needs: grant type
authorization code, a Callback URL ending in/auth/proxy/connection/snowflake-verify/callback, and the scopesession:role-any. Copy the Callback URL exactly as shown; it names your Astrato host.
-
In a Snowflake worksheet, create the security integration with that callback URL:
CREATE SECURITY INTEGRATION ASTRATO_OAUTHTYPE = OAUTHENABLED = TRUEOAUTH_CLIENT = CUSTOMOAUTH_CLIENT_TYPE = 'CONFIDENTIAL'OAUTH_REDIRECT_URI = '<Callback URL from Astrato>'OAUTH_ISSUE_REFRESH_TOKENS = TRUEOAUTH_REFRESH_TOKEN_VALIDITY = 7776000;Refresh tokens let Astrato renew each person’s short-lived access token;
7776000seconds is 90 days, after which people sign in again. Follow your own policy for these values and for which roles to block. -
Read the client ID and secret from Snowflake.
DESC SECURITY INTEGRATION ASTRATO_OAUTH;showsOAUTH_CLIENT_ID, andSELECT SYSTEM$SHOW_OAUTH_CLIENT_SECRETS('ASTRATO_OAUTH');returns the client secret. -
Back in Astrato, select Continue to Setup and fill in:
- Integration name: the name people will see when they choose an OAuth connection, such as
Snowflake production. - Snowflake account URL: your account URL with
https://, such ashttps://ab12345.eu-west-2.aws.snowflakecomputing.com. - Client ID and Client secret: the values from step 4.

- Integration name: the name people will see when they choose an OAuth connection, such as
-
Select Create. The new integration opens, reading “Snowflake is not enabled”.
-
Under Verification, select Verify connection and sign in to Snowflake in the window that opens. When sign-in succeeds, the status changes to “Snowflake is enabled”. Verify the integration before using it to access data.

People creating a connection then choose Sign in with Snowflake, pick this integration under OAuth connection and select Sign in; see step 3 of Create the connection. The hint below the list says whether they are already authorized, need to sign in, or need to sign in again because authorization has expired.
To change the integration later, select Edit on its row in Access integrations. The stored client secret is never shown: select Replace secret to enter a new one, then select Save. While the integration is not yet verified, Verify connection stays unavailable until you save your changes.
Troubleshooting
Section titled “Troubleshooting”| What happens | Likely cause | What to do |
|---|---|---|
| Validation fails straight away | Wrong Account URL, username or credential | Copy the account URL again from Snowsight, check the username, and re-enter the credential |
| Validation fails with a password that works in Snowsight | The user has multi-factor authentication, which Password (legacy) cannot complete | Switch to Private key (Recommended) |
| Validation fails with a generated key | The ALTER USER statement was not run, or was run for another user |
Run the statement shown under the private key with a role that can alter the user, then validate again |
| Validation fails only from your network | A Snowflake network policy blocks Astrato | Allow the addresses in Network policy |
| “This credential reported no databases. Check its grants, or validate again.” | The role has no USAGE on any database |
Grant the privileges in Role and privileges, or choose another Role |
| Save connection stays unavailable | No Warehouse or Database chosen, or the role cannot use a warehouse | Choose both; if the warehouse list is empty, grant USAGE on a warehouse to the role |
| “No configured OAuth connections.” | No Snowflake access integration is set up in Astrato | Ask a workspace administrator to set one up, or use Private key (Recommended) |
The full list of messages, for every source, is in When a data connection will not validate.
What next
Section titled “What next”- Create a semantic layer on the new connection.
- Snowflake features Astrato supports and warehouse cost and performance.
- Manage resource access to let other people build on this connection.