Skip to main content
All CollectionsIntegrationsSnowflake
Setting up the Snowflake integration
Setting up the Snowflake integration

An overview of the Snowflake integration

Christian Dreyer avatar
Written by Christian Dreyer
Updated over 5 months ago

Summary

  • Data you can sync

    • CRM data

      • Including mapping columns to both standard and custom fields on models

    • Time-series usage data

  • Sync direction

    • CRM data:

      • Specify per model and field

      • Choose between both directions, send, or receive

    • Time-series usage data: Snowflake to Planhat

  • Sync frequency

    • CRM data: hourly

    • Time-series usage data: every 5, 10, 30 or 60 minutes, or daily on a schedule

  • Data mapping

    • See table below

Who is this article for?

  • Anyone who would like an introduction to the Snowflake integration

Series

This article is part of a series on the Snowflake integration:


Article contents


Introduction

Planhat's Snowflake integration enables you to sync CRM (static) data bidirectionally, and time-series usage data from Snowflake to Planhat. Data is synced automatically, on a fast, regular cadence.

With your Snowflake data in Planhat, you can leverage Planhat’s workflow platform to take data-driven action, to drive long-term value for your customers and improve internal efficiency. In addition, you can consolidate Snowflake data with additional data types, such as tickets or emails, to give your team a complete 360° view of your customers. You can also quickly and easily perform advanced data analysis and visualise your Snowflake data, helping your team proactively identify risks and opportunities to retain and grow customer revenue.

Here's a summary of some key specifications related to the Snowflake integration; we discuss these in further detail in this article.

CRM data

Usage data

Automatic sync frequency

Hourly

(requires "change_tracking" in Snowflake)

Your choice: every 5, 10, 30 or 60 minutes, or once per day at specified time

ID (key) requirements

Unique and text

Unique, numeric and incrementing


Data mapping

Planhat

Sync direction

Snowflake

CRM data: Planhat models

(Company, End User, License and Opportunity etc.)

Bidirectional (or one-way)*

Tables or views

Time-series usage data

(User Activities and Custom Metrics)

From Snowflake to Planhat

Tables or views

*Note: Data cannot be synced from Planhat back to Snowflake views, as views are built on the fly in Snowflake.


Summary of setup steps

There are two main stages to setting up the Snowflake integration:

  1. Preparation in Snowflake and integration authentication

    • For details, see this article

    • A. Setup steps in Snowflake: preparing the Snowflake warehouse

      • Enable OAuth

      • Create an integration user and a role for it with the necessary permissions

      • Create a database and schema if they don't exist yet

      • Create a default warehouse and give the role access

      • Create a files stage and grant permissions

      • For CRM data, activate "change_tracking" for the tables or views

      B. Connecting Snowflake to Planhat - in the Snowflake integration in Planhat:

      • Enter Snowflake authentication information

      • Click "Authenticate Now" in the integration, and log into Snowflake using the details set up earlier in the process

      • Turn on the "Enable the Snowflake integration" toggle switch

      • Enter your user in the "User" box, and then select your warehouse, database and schema from the dropdown menus

  2. Data mapping in Planhat's Snowflake integration

    • For details, see this article

    • The next stage is configuring the mapping in the Snowflake integration in Planhat, for CRM and/or usage data depending on what you want to sync

    • The main principles for each sync section are:

      • Choose what data model/type in Planhat to map to what column in Snowflake

      • For CRM data, choose the sync direction

      • Specify the unique IDs (keys) used in Planhat and Snowflake

      • Set up field mapping

      • For usage data, choose the sync frequency and batch size


Sync frequency

CRM data

CRM data can be synced automatically, both to and from Snowflake, on an hourly basis.

To enable the automatic sync, turn on the toggle switch "activate Snowflake automation synchronization" at the top of the integration.

Before you do this, ensure that "change_tracking" is turned on in Snowflake (for each relevant table/view). You should also do a manual full sync (via the "Full sync" button) to set the baseline and enable the integration to detect that change tracking is on.

The automatic sync every hour is a partial sync - syncing new/updated data.

If you don't enable the automatic synchronisation of CRM data, you can sync manually via the "Full sync" button, or using the arrow symbols at the right of each sync section. These are full syncs rather than partial syncs.

Usage data

You can set Planhat to fetch usage data from Snowflake every 5, 10, 30, or 60 minutes, or daily at a specified time.


Unique IDs

For both CRM data and usage data, the integration uses unique IDs for data mapping. You may hear these referred to as keys, keyables, IDs or identifiers.

The requirements for these unique IDs are slightly different for CRM data compared to usage data.

CRM data

When configuring CRM data mapping, for each sync section (Planhat data model), you select an ID for both the Planhat side and the Snowflake side.

The Planhat ID could be Source ID or External ID, or email address in some cases. These are fields on the Planhat models, containing a unique ID to specify that particular record (e.g. the Company record for Apple).

For the ID on the Snowflake side, select a suitable column from the dropdown menu. The ID/key must be unique and text fields.

(For CRM data, in order for Planhat to fetch updates from Snowflake, you need to enable "change_tracking" for the relevant table or view in Snowflake. This is necessary so the integration can identify what's changed, and implement the automatic partial sync that runs when you enable the "activate Snowflake automation synchronization" toggle switch.)

Usage data

When it comes to the one-way sync of usage data (time-series data), there are some differences:

  • There isn't an ID on the Planhat side, only the Snowflake side

  • The ID in Snowflake is also used for change tracking - i.e. to identify which rows are new data (that haven't been synced yet)

Rows in Snowflake must be identified by a unique, numeric, incrementing column for the ID (key).


Logs and errors

If there are any errors with authorisation or sync (for example, if your Snowflake token has expired), they are surfaced in the Snowflake integration.

There are also detailed logs available within the integration, so you can see what actions have occurred and when.

This means it's easy for you to investigate and resolve any issues. You can refer to our troubleshooting article for further guidance. Your TAM/CSM and our Support team would be happy to help if you require any additional advice.


Next steps

  • If you're ready to start setting up the Snowflake integration, part 1 of the setup guide is here

Did this answer your question?