
Overview
The Snowflake integration imports rows from Snowflake tables. For each table, you choose the column that uniquely identifies a row, the column that holds its timestamp, and the column that holds the text Dovetail analyzes. Every other column comes across as a field you can filter by. Each table you add becomes a dataset. Snowflake connects with key-pair authentication rather than a sign-in. You set up a Snowflake service user with a key pair, then give Dovetail its private key. Dovetail only reads from Snowflake.
A workspace admin creates the Snowflake source once for the whole workspace, and channels then add its tables. Learn more about Sources →
If your workspace doesn’t have Sources, see Connect a tool without Sources. Complete Before you start and Step 1 on this page first.
Before you start
In Dovetail
- A workspace admin creates the source. Other users can request it.
- The credentials you connect with are shared by the whole workspace. See Shared credentials for how to choose an account.
In Snowflake
- Privileges to create a role and a user, such as
SECURITYADMINorACCOUNTADMIN, and to grant read access to the tables you want to import. Alternatively, use an existing service user that’s already set up for key-pair authentication. - A service user with key-pair authentication and
SELECTon the table. The next section walks through the setup. - A table with the three columns Dovetail needs: a unique identifier, a timestamp, and the text to analyze. See Column type restrictions.
- A tool that generates RSA key pairs, such as
openssl.
Step 1 — Set up a Snowflake service user
Do this once in Snowflake. ASECURITYADMIN or ACCOUNTADMIN typically runs it. It creates a dedicated read-only role and user, then registers a key pair on that user. Adjust the object names to match your account.
Create a read-only role and grant minimal access
Generate a key pair
Generate an unencrypted PKCS#8 private key and its public key:Dovetail’s connection form accepts an unencrypted private key. The form has no passphrase field, so passphrase-protected keys aren’t supported. Don’t add
-passout or encryption when you generate the key.Create the user and register the public key
Copy the public key body without the-----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY----- lines and without line breaks, then run:
If you leave Role (optional) blank in Dovetail, Snowflake uses the user’s default role. Make sure the role that carries these grants is the user’s
DEFAULT_ROLE, or enter that role in Dovetail.Create the Snowflake source
1
Open Sources and select Snowflake
In the sidebar, select Sources, then select Snowflake. If your workspace already has a working Snowflake connection, Dovetail skips the connection form.
2
Connect Snowflake
Enter the connection details:
- Account identifier — your Snowflake account, for example
MYORG-MYACCOUNT, or an account locator such asxy12345. - Username — the service user, for example
DOVETAIL_USER. - Warehouse — the warehouse Dovetail runs its queries on, for example
DEV_WAREHOUSE. - Role (optional) — the role to use. If you leave it blank, the user’s default role applies.
- Private key (PEM) — the full contents of
dovetail_key.p8, including the-----BEGIN PRIVATE KEY-----and-----END PRIVATE KEY-----lines.
Connect.3
Choose a table and an import period
In Fully-qualified table name, enter the table as
DATABASE.SCHEMA.TABLE, for example MY_DB.MY_SCHEMA.FEEDBACK, then select Load columns. Choose a different column for each of Unique identifier, Timestamp, and Text to analyze. See Column type restrictions. Then choose an Import period. See Import period.You add one table here, and you can add more after the source is created.4
Choose who can use the source
Choose who can use the source, then select
Next. See Create a source.5
Create the source
Choose whether to auto-redact sensitive information in the source’s data, then select
Create source. The first import starts right away. See Redact data from sources.Authentication and permissions
Snowflake uses key-pair authentication. Dovetail connects as your service user and signs in with the private key you entered. Access ends when you unset the public key, drop the user, or revoke the role’s grants in Snowflake. Dovetail runs onlySELECT and DESCRIBE TABLE queries, and doesn’t write anything to Snowflake. Queries run on the warehouse you entered, under the role you entered or the user’s default role, so the role’s grants limit what Dovetail can read.
The Snowflake connection is stored once for the whole workspace. To change the account or credentials, see Reconnect a source.
Datasets
Each table you add becomes its own dataset and syncs on its own, so a problem with one table doesn’t stop the others. You add one table while you create the source. A Snowflake source can hold up to 25 tables, and a channel can add some or all of them. You can’t change a table’s column mapping after you add it. To use different columns, delete the table from the source and add it again. See Delete a dataset for what deleting removes. To add more tables later, open the source and selectAdd table. See Add datasets.
Column type restrictions
Each column role accepts only certain Snowflake column types, and its menu lists only the columns that match:
Dovetail converts the table name you enter to uppercase, so a table whose name was created in double quotes with lowercase letters or other characters can’t be loaded.
What gets imported
Each row in a table becomes one data point.Always imported
Imported when present
Every other column in the table becomes a field on the data point, named after its column in sentence case, soOPERATING_SYSTEM becomes “Operating system”. Dovetail sets the field type from the column type:
Values in semi-structured, binary, and geospatial columns might not import. If you need one of those columns, convert it to a
VARCHAR column.
To rename the fields above or change their types, see Source fields.
Not imported
- Rows with an empty Unique identifier or Text to analyze cell, or with a Timestamp that can’t be read as a date.
- Edits to a row that don’t change its timestamp. See Sync behavior.
- Contact links. Snowflake rows aren’t linked to contacts, even when a column holds an email address.
Scores and field types
Dovetail doesn’t set the NPS or CSAT type on Snowflake fields. A numeric score column, such as an NPS or CSAT score, arrives as a Number field. To chart scores in Dashboards, the field must use the NPS or CSAT type. See NPS and CSAT scores for Dashboards.Sync behavior
The first import starts when the source is created. After that, the source syncs about every hour. See Manage a source.- Import period. The import period applies to the Timestamp column.
- Ongoing sync. Each sync imports the rows whose timestamp is later than the latest timestamp already imported from that table.
- Choose the timestamp column carefully. Rows added later with an earlier timestamp are never imported, and edits to a row that don’t change its timestamp aren’t imported either. Use a timestamp that’s set when a row is created and only moves forward, such as a created-at column.
- Warehouse. Syncs use the compute of the warehouse in the connection.
Troubleshooting
Snowflake rejects the connection. Check that you registered the public key on the Snowflake user, that you pasted the matching private key into Dovetail, and that the account identifier and username are correct. “Couldn’t connect to Snowflake.” Check the Account identifier format, for exampleMYORG-MYACCOUNT or an account locator such as xy12345, without https:// or a path. Then check the Warehouse name, and that the role has USAGE on that warehouse.
“Must be a PKCS#8 private key.” Paste the whole unencrypted PKCS#8 key, including its -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- lines.
The table’s columns don’t load. Enter the table as DATABASE.SCHEMA.TABLE, and check that the role has USAGE on the database and schema, and SELECT on the table. See Column type restrictions.
A column I want doesn’t appear in a menu. The Timestamp and Text to analyze menus list only columns of a compatible type. See Column type restrictions.
A table shows “Snowflake rejected the query” or “The configured Snowflake table can’t be found.” Check that the table still exists under the same name, and that the role Dovetail uses still has USAGE on the warehouse, database, and schema, and SELECT on the table. If the table was renamed, add it to the source again under its new name.
The source is connected, but no rows import. Check that:
- The role has
USAGEon the warehouse, database, and schema, andSELECTon the table. - The table has rows with a timestamp within the import period, or later than the rows already imported. See Get older data.
- The rows have a unique identifier, text to analyze, and a timestamp Dovetail can read. Rows missing any of them are skipped.
- The channel includes the table’s dataset. See Missing or outdated data.
Revoke access in Snowflake
Pausing or deleting the source in Dovetail doesn’t change anything in Snowflake. To cut off Dovetail’s access, unset the public key on the service user, or drop the user:Related guides
Sources
What a source is, and how its data reaches channels.
Channel setup
Add the source’s tables to a channel, or remove them.
Manage a source
Check a source’s status, sync it, pause it, or add tables.
Voice of customer
Bring Snowflake rows together with other customer feedback in Channels.