How to use Snowflake data in TheyDo
Once your Snowflake integration is connected, you can create metrics that pull data directly from your Snowflake tables using SQL queries.
Overview
Snowflake metrics in TheyDo are query-based — you write a SQL query that returns the data you want to display, and TheyDo fetches and displays it as a metric. You can attach these metrics to journey steps or add them to your Metrics Library.
Creating a metric from Snowflake
- Open a journey and select Add a metric, or go to the Metrics Library and select + Metric.
- Choose Snowflake as the data source.
- Select the connected Snowflake instance (e.g., My Instance).
- Choose the metric type (CSAT, CES, NPS, RATIO, or Other).
- Enter a name for the metric.
- Write your SQL query using your connected Snowflake table.
- Click Save and run — TheyDo will fetch the data and display it.
SQL query requirements
Your query must return the columns required for your metric type:
| Metric type | Required columns |
|---|---|
| CSAT | date, positives, negatives, respondents |
| CES | date, respondents, value |
| NPS | date, detractors, promoters, respondents |
| RATIO | date, numerator, denominator |
| OTHER | date, value |
If your Snowflake table uses different column names, use SQL aliasing:
SELECT det AS detractors, prom AS promoters, resp AS respondents, dt AS date FROM my_schema.nps_table
Tips
- Your data team can help you write and validate queries.
- If you have multiple Snowflake instances connected, select the right one before writing your query.
- Metrics pull live data, so they'll stay up to date as your Snowflake tables change.
- For questions about security and data storage, see the Snowflake integration article.