This article helps you connect your externally hosted database and assumes that you have already prepared your database to make it usable. More information on how to prepare your database is available on the Preparing your hosted database for Relational Data page.
Prerequisites
Before you start, note the following requirements:
- Give the user
USAGE
privilege for the warehouse. - Give the user
SELECT
privilege for every table and view in the schema you would like to use for segmentation and personalization.
In case of using allowlist: add the following IP addresses to the relevant network rules: 34.89.173.3
, 34.89.137.140
, 35.246.249.205
, 185.4.123.112
Do not add these IP addresses or IP ranges to the blocklist as the connection will be interrupted.
Meeting these requirements ensures Emarsys' access to your database.
Setting up the connection
The first step in using Relational Data is to set up the connection between your database and Emarsys.
- In the Emarsys platform, go to Add-ons > Relational Data > Connections.
- In the top right corner in Connections, click Create New Connection.
- Select Snowflake.
- Configure your connection as follows:
- Connection name: the reference you want to give to your connection, can be the same as the database name.
The Connection name can include only upper-, and lowercase English letters, numbers and underscores. It must start with letter or underscore.
-
Account name: the name assigned to your account by Snowflake. In the hostname you received from Snowflake (after your account was provisioned), your account name is the entire string to the left of
snowflakecomputing.com
. Example:xy12345.us-east-1-gov.aws.
- Warehouse name: the name of the virtual warehouse existing in Snowflake.
- Schema: the name of the schema you want us to use when we connect to snowflake.
- Database name: the name of the database you want us to use when connecting.
Note that the following must be written in capital letters: Schema, Database name.
- User name: the login name for the Snowflake user you want to use when connecting.
- Password: password for the Snowflake user you want to use when connecting.
- Connection parameters (optional): specify additional Java DataBase Connectivity (JDBC) (version 2.1) connection parameters you would like to use when establishing the connection, or leave it empty to use default parameters.
- When you finished adding all the necessary data, Test your connection.
- Click Save to create the connector you just set up.
You are done and can now either:
Note that, when personalization runs as part of a campaign, personalization will perform lookup queries on your Snowflake database.
Because of the way that Snowflake calculates costs, engaging in a lot of personalization using Relational Data and Snowflake can result in increased costs.