Skip to main content

Introduction

Snowflake is a data platform that allows organizations to store, analyze, and process large volumes of structured and semi-structured data in a highly scalable and efficient manner. With its unique architecture, Snowflake allows organizations to consolidate their data, perform quick analytics, and gain valuable data-driven insights accessible to all users.

MoEngage × Snowflake

The MoEngage × Snowflake integration allows you to set up a direct connection between your Snowflake instance and MoEngage app to sync data on a recurring basis. You can define a schedule to run the sync periodically - syncs can be as frequently as every hour or as infrequently as once per month. When a sync runs, MoEngage will directly connect to your data warehouse instance, retrieve all new data from the specified table, and update the corresponding data on your MoEngage dashboard.

Benefits

Reduce integration time

  • No more searching for the right ETL tool, as MoEngage directly integrates with Snowflake.
  • Long and complicated ETL pipelines are now replaced with a one-time integration setup that gives MoEngage direct access to your data without actual data flow.
  • This decreases the dependency on tech teams significantly.

Faster data processing

  • The power of the Snowflake infrastructure enables us to store, process, and query massive amounts of data in near real-time.
  • Any changes in the original schema are propagated immediately without having to change any configuration on MoEngage’s end, which is a significant advantage over the traditional ETL pipelines.
  • Since there is no need for ETL tools and external cloud providers, the cost of import is significantly lower than traditional data pipelines.

Integration use-cases

  • Sync real-time audiences from Snowflake
  • Keep your users in MoEngage up-to-date with the user data in your Snowflake account.
  • Import event data from your Snowflake account directly into MoEngage.
  • Import users into MoEngage and retarget them via custom segments.

Integration

PrerequisitesEnsure you have a Snowflake account with enough permissions to create new users, schemas or tables.

Enable IP Whitelisting

MoEngage recommends that you whitelist all the MoEngage IPs listed for your data center under Data Transfer. MoEngage connects to your system from these IPs for data imports, data warehouse exports, streams, and connection tests on the App Marketplace. To find your data center, see Data Centers in MoEngage. In Snowflake, create a network rule that contains the MoEngage IPs, add the rule to a network policy, and activate the policy for the MoEngage user. A network policy activated for a user overrides the account-level policy, so other users aren’t affected. If you activate the policy for your whole account instead, add your own IP ranges to it too. For the steps and the roles required, see Controlling network traffic with network policies in the Snowflake documentation.

Set up a new Snowflake Connection

In order to import or export from Snowflake, you will first need to connect MoEngage to your Snowflake data warehouse. To create a new Snowflake Connection:
  1. On your MoEngage Dashboard, go to the App Marketplace.
  2. Search for “Snowflake”. Search for Snowflake on the App Marketplace
  3. Go to the Integrate tab, and click + Add Connection.
  4. Provide your Snowflake data warehouse details: Snowflake connection form
    1. Select Key as your authentication method.
    2. Click on Generate Key and MoEngage will display your public key. You will need to add this public key to your database user. Follow the instructions mentioned on Snowflake help docs to set this up: Generate key UI
    3. Once you have added this key to your database user, click on Test connection and MoEngage will attempt to verify the credentials. MoEngage also supports the rotation of keys. If your IT Policy requires key rotation, you can do it by following these steps:
    4. Go to the App Marketplace > Snowflake > Integrate and edit the connection.
    5. Click on the generate new key icon: Generate new key icon
    6. A confirmation will be asked for you to review. Please read the instructions carefully. Once you save the connection with the newly generated key, MoEngage will no longer use the previous key. You have to ensure that the new key is attached to your database user as the second RSA key (see Snowflake help doc on rotating keys) for the rotation to work properly. If the new key is not attached after saving the connection, your imports and exports might break: Key rotation confirmation
    7. Your new key will be generated and shown to you. At this point, it is highly recommended to copy this new key and attach it as an additional key to your Snowflake database user by following the instructions provided on the Snowflake help docs. Once you have attached the new key, you need to test the connection successfully to complete the rotation.
    8. At any point after generating the new key, if you decide to close the edit form, or do not click on Connect, your old (existing) key will continue to be used as before and the newly generated key will be deleted from our system.
  5. Once you have set up a Snowflake Connection, you can use that to set up various imports and exports in MoEngage.
If your Snowflake instances aren’t public and are on AWS, we recommend you set up AWS Private Link with MoEngage AWS account. Please reach out to your account manager for more information on this.

Supported Datetime Formats

Rotating your Snowflake credentials

MoEngage recommends rotating your credentials every 90 days or as per your IT policy. Follow the steps below to rotate your credentials.
Change the password of your Snowflake user, then update it in MoEngage. Your old password stops working as soon as you change it in Snowflake.
Your imports and exports fail from the moment you change the password in Snowflake until you save the new password in MoEngage. Complete both parts together, ideally when no imports or exports are scheduled.
  1. In Snowflake, set a new password for the user that MoEngage uses to connect. You can do this in one of the following ways:
    • Snowsight: Go to Governance & security > Users & roles, find the user, click the More options icon, and click Reset Password. Enter and confirm the new password, then click Update.
    • SQL: Run the following command with a role that has the OWNERSHIP privilege on the user:
    For more information, refer to the Snowflake password reset guide.
  2. In your MoEngage Dashboard, go to App Marketplace, open Snowflake, and go to the Integrate tab. Edit the existing connection.
  3. Enter the new password in the Password field.
  4. Click Test connection. The test must succeed to complete the rotation.
  5. Click Connect to save the connection. MoEngage then starts using the new password.
Snowflake is phasing out password sign-in for service users. For more information, refer to the Snowflake MFA rollout guide. To avoid disruption, consider switching the connection to key pair authentication.
Generate a new key in MoEngage and attach it to your Snowflake user as a second key. Your imports and exports keep running with the current key until you save the new one.
  1. In your MoEngage Dashboard, go to App Marketplace, open Snowflake, and go to the Integrate tab. Edit the existing connection.
  2. Click the Generate new key icon. Generate new key icon
  3. Read the confirmation message carefully, then continue. MoEngage shows the new key. Key rotation confirmation
  4. Copy the new key and attach it to your Snowflake user as the second RSA key, following the Snowflake key rotation guide. Keep the current key in place for now.
    Attach the new key before you save the connection, or your imports and exports might break.
  5. Click Test connection. The test must succeed to complete the rotation.
  6. Click Connect to save the connection. MoEngage then starts using the new key.
    If you close the form without clicking Connect, MoEngage continues to use the current key and deletes the new one.
  7. After you confirm the connection works as expected, delete the old key from your Snowflake user.

Warehouse Segments Using Snowflake

Snowflake is now available in our Warehouse Segments. For more information, refer to Warehouse Segments.

Import users and events from Snowflake into MoEngage

Read our Snowflake Imports guide to set up MoEngage × Snowflake imports for your account.

Export Events from MoEngage to Snowflake

You can export events from MoEngage to your Snowflake tables. Exports require the Streams add-on to be enabled for your workspace. To set up an export, refer to the Snowflake Exports guide.