This article describes how developers can set up an automatic export of event data from mtribes to their Snowflake Data Cloud account.
Topics covered here:
- What is the Snowflake plugin?
- How do I use the Snowflake plugin?
- What can I expect after setting up the Snowflake plugin?
What is the Snowflake plugin?
The Snowflake plugin is an automatic hourly export of Tribe and event data from mtribes to your Snowflake Data Cloud account.
mtribes collects data about the behavior of your audience on your platform, such as how many times your content was “served” to them, and other tracking events like clicked or viewed. It also allows you to segment them into Tribes with common characteristics.
This plugin allows you to consolidate this important behavioral and segmentation data with your other data in Snowflake, helping you to gain a fuller picture of your audience.
How do I use the Snowflake plugin?
To use this plugin, you must first have a Snowflake Data Cloud account set up with the necessary structure and permissions.
- Create a Warehouse, Database, and Schema on your Snowflake account for mtribes events.
- Create a table under the Schema as shown below:
CREATE TABLE <Database.Schema.Tablename> ( DATA String )
- Create a username and password in Snowflake for mtribes and grant the privileges and roles required to access the table.
Once you've completed the steps above in Snowflake, go to the Developer section in mtribes.
Ensure you enter these exact details, so mtribes can write data to Snowflake.
You should create two separate tables for events and Tribes within Snowflake, as the data is a different format and structure.
Note: The account ID is your Snowflake account ID. The username and password must be the credentials you set up for mtribes, not your personal login credentials.
What can I expect after setting up the Snowflake plugin?
Once set up, this export runs hourly and contains events that have occurred in the previous hour since the last export and a new snapshot of the Tribes your users are in. This continues to run until you turn it off.
When your export is complete, a success status and timestamp displays with the number of exported records. If the export fails, check the Snowflake credentials or database structure and make sure it matches what you provided in mtribes.
Failures occur when mtribes can't authenticate or successfully write to the location specified.
The event data sent is unique to the Environment (Development, Staging, or Production) where you set up the export. We suggest setting up different tables in Snowflake to send each Environment's events to.
Data is not stored in mtribes beyond 30 days for data privacy regulations.