Snowflake
Overview
Sortment lets you pull data stored in your Snowflake warehouse and use it to create schema.
📘 Connecting Sortment to Snowflake requires some setup in both platforms. It's recommended to set up a service account with the correct permissions in Snowflake before configuring the connection in Sortment.
Snowflake credential setup
To allow Sortment access to Snowflake, it's best to create a user specifically provisioned with access to the required tables and schemas. You could also use a personal Snowflake login for your credentials, as long as it has the correct permissions.
You can use the following SQL template to create a service account with the necessary roles and permissions with some considerations:
This snippet provides an example of creating a service account; you may need to alter it depending on your Snowflake implementation details.
If you want Sortment to access multiple databases, run the snippet multiple times, changing
smt_read_db
each time.Sortment needs write access to write back Audiences and Campaigns data back to your Snowflake account.
The snippet includes lines for creating a new warehouse and database for Sortment to use; if you already have databases and warehouses you intend to use, omit these lines
Once you've created a Snowflake service account, you're ready to set up the connection in Sortment.
Connection configuration
To get started, select Snowflake on Data connections page and and follow the steps below.
Configure your source
Enter the following required fields into Sortment:
Account identifier: This is always found at the beginning of your Snowflake URL which might look like this:
https://ACCOUNT_IDENTIFIER.snowflakecomputing.com
.ℹ️ Account identifier format may differ based on Snowflake account age.
For example, older Snowflake accounts often have identifiers that look like ACCOUNT_LOCATOR.CLOUD_REGION_ID.CLOUD, whereas newer Snowflake accounts have identifiers that look like ORGNAME-ACCOUNT_NAME.
For more details, visit Snowflake's account identifier docs.
Warehouse: The warehouse that will be used when Sortment executes queries in Snowflake.
Database: The database that Sortment can access to write data in Snowflake.
User credentials
Enter the following fields into Sortment:
Username: This can be your personal Snowflake login or a dedicated user for Sortment. At minimum, this user must have read and write access to your data.
Role - This role will be used when executing queries in Snowflake. If left blank, Sortment will use the user’s default role. It is preferred that this role has read and write access to the database for uninterrupted usage.
Password - This is the password for the user specified above.
Test connection
When setting up a source for the first time, Sortment validates the following:
Network connectivity
Snowflake credentials
Permission to list schemas and tables
Permission to write to the schema
All configurations must pass them for uninterrupted access to Sortment. Some sources may initially fail connection tests due to timeouts. Once a connection is established, subsequent API requests should happen more quickly, so it's best to retry tests if they first fail. You can do this by clicking Continue again.
If you've retried the tests and verified your credentials are correct but it is still failing, reach out to support@sortment.com
Tips and troubleshooting
If you encounter an error or question not listed below and need assistance, don't hesitate to reach out . We're here to help.
Connection timeout
When initially testing your connection, you may receive a connection timeout error. Once a connection is established, subsequent API requests should happen more quickly, so it's best to retry the tests if they first fail. You can do this by clicking Continue again.
Network error: Could not reach Snowflake
You may receive this error if the input for Account identifier is invalid. Instead of using the complete Snowflake URL, for example, https://ACCOUNT_IDENTIFIER.snowflakecomputing.com
ensure that you're only using the ACCOUNT_IDENTIFIER part of the URL, for example, companyname-abc123 or companyname-abc123.us-east-1.
Last updated