Skip to main content
This guide covers how to connect Snowflake to Mixpanel using Warehouse Connectors. For an overview of Warehouse Connectors, including table types, sync modes, and FAQs, see the Warehouse Connectors overview.
Organizations on a paid event-based plan receive Warehouse Connector as a free add-on when they update or renew their plan. Learn more on our pricing page.
To set up Warehouse Connectors, you must have an admin or owner project role. Learn more about Roles and Permissions.

Connect Snowflake

Navigate to Project Settings → Warehouse Sources. Select Snowflake and follow the instructions to connect it. Note: you only need to do this once.
To connect to Snowflake, you will need:
  • Your Snowflake account identifier, which you can find in the URL of your Snowflake account (https://YOUR_ACCOUNT_NAME.snowflakecomputing.com/).
  • A dedicated Mixpanel user account and role. The user account can use either key-pair or password authentication. If using key-pair authentication, Mixpanel will generate a secure key-pair during the connection process. The public key will be provided during the setup process, and the private key will be encrypted and stored securely.
  • A Snowflake WAREHOUSE Mixpanel will use to unload data. We recommend creating a dedicated warehouse for Mixpanel to avoid impacting other workloads.
  • A Snowflake STORAGE INTEGRATION Mixpanel will use to unload data. This integration can optionally restrict STORAGE_ALLOWED_LOCATIONS to the unique Mixpanel-managed bucket created to receive data for this connection.
  • A new, empty MIXPANEL SCHEMA the Mixpanel user has the USAGE and CREATE STREAM permission for (if you are using Mirror).
  • The Mixpanel user needs the USAGE and SELECT permissions to have read-only access to any tables and views you plan to sync. Adjust this example to fine-tune permissions.

IP Allowlist

If you are using Snowflake Network policy to restrict access to your instance, you might need to add the following IP addresses to the allowed list. US
EU
IN
  • Some users report seeing the following error ErrorMessage=SQL compilation error: Cannot unload to an inlined external location. Please create a stage first and unload to the stage instead.. To resolve this error, you may set the following account security setting:
See the Snowflake documentation on this setting before making the change.

Mirror Mode

Mirror syncs work by having Snowflake compute which rows have been inserted, modified, or deleted and sending this list of changes to Mixpanel. Mirror uses Snowflake Streams to track changes to Snowflake tables or views. The only requirement to use Mirror on a Snowflake table or view is to enable change tracking:
Mixpanel will create and manage the necessary STREAM objects in the MIXPANEL schema created during Connect Snowflake. Considerations when using Mirror with Snowflake:
  • Snowflake Streams only maintain change tracking metadata for a limited number of days determined by the larger of DATA_RETENTION_TIME_IN_DAYS and MAX_DATA_EXTENSION_TIME_IN_DAYS (default is 14 days for MAX_DATA_EXTENSION_TIME_IN_DAYS). Make sure that the Mixpanel sync does not go longer than this number of days without running. Mixpanel recommends leaving the default of 14 days to ensure that if Mixpanel loses access to the warehouse unexpectedly (e.g., a credentials change), there is time to correct the issue.
  • Snowflake Streams do not work if a table is deleted and re-created with the same name. If using a tool like DBT to model data in Snowflake, make sure to use an incremental model so that DBT does not replace the table each time it runs.
  • Snowflake streams don’t capture changes when a column is deleted or renamed, so deletion of columns won’t be synced to Mixpanel.
  • Snowflake has specific requirements when using Streams on Views that must be met when using Mirror with views.
  • While Snowflake Streams are a very efficient way of tracking changes, there are some performance implications when using Streams on VIEWs that contain JOINs. If you find yourself needing such a JOIN in event data, we recommend considering if syncing the joined data as User Profiles, Group Profiles, or a Lookup Table would work instead.
Handling schema changes when using Mirror with Snowflake: Adding new, default-NULL columns to Mirror-tracked tables/views is fully supported.
We recommend avoiding other types of schema changes. Snowflake streams only reflect changes to tables from DML statements. DDL statements that logically modify data (e.g., adding new columns with default values, dropping existing columns, or renaming columns) will be reflected in future data sent to Mixpanel, but the Stream will not update historical data with changes caused by DDL statements.