Skip to main content
Skip table of contents

External Database Explorer

image-20240410-054305.png

The External Database Explorer enables marketers to bring their own database (Snowflake or Google BigQuery) to ZMP and segment directly on it using the standard ZMP audience builder workflow.

Please get in touch with your Zeta Representative to enable this functionality for your account(s).

Connecting a Snowflake or Google BigQuery Database

1. To create a connection, navigate to Settings > Integrations > Connections.

image-20240409-205914.png

2. Create a new connection by choosing one amongst Snowflake or BigQuery from the Connection Via dropdown, and input your credentials.

3. Once your connection is saved, you can immediately create SQL segments but will at least need to assign a user_id to create a segment with the Database Explorer.

Configuring a Connected Database

Within the Connections library, click on the action menu (three dots) against the desired Snowflake or Google BigQuery connection and select Configure Tables from the dropdown.

image-20240409-213749.png
  • This will direct you to a listing of all the tables in your connection

Please note that it can take a few minutes for all the tables to populate upon initially creating the connection.

image-20240409-221804.png

Column Mappings

1. To get started with creating segments, click on the action menu (three dots) against the table that contains your users.

2. Next, select the column that identifies your users and turn the toggle on for Set as User ID.

image-20240410-001530.png
  • You can also toggle fields on and off for segmentation and personalization.

  • Additionally, you can add column aliases.

Table Mappings

1. To create a mapping, select your source table, and from its action menu (three dots), select Table Mappings.

2. Within the Mappings page, click on Add Mapping to create a new join.

image-20240410-002150.png
  • Table 1 will be preselected and then you can select the:

    • Field to join on

    • Table to join to

    • Field to join to

    • Join type

You can add more mappings from the current table or select a new table to create joins.

Please note that segmentation is available for single tables without any configuration, but only one table may be targeted at a time unless the mappings (joins) are configured here.

Additional Options

About This Table

Selecting About This Table from the action menu (three dots) dropdown will display the panel containing information about the specific table.

  • We can add an alias to make the segmentation easier. For example, instead of seeing demo_db.external_schema.users.email, we would see users.email.

image-20240410-002605.png

Refresh Table

Selecting Refresh Table from the action menu (three dots) dropdown will allow us to manually refresh the connected table to add/remove columns if the table has been updated. This process happens periodically but can be refreshed manually as well if needed.

Using a Connected Database in Segmentation

1. From the main menu on the left, navigate to Audiences > Database Explorer to segment based on the data available to you for a given connection.

image-20240410-003051.png

Please note that you cannot join multiple sources of data when segmenting with this option.

2. When selecting fields for segmentation, you will see the alias names. Hovering over them will reveal their original full names as well.

image-20240410-003318.png

Please note that when creating a segment, some fields may be unavailable if they are not part of a mapped table that has been selected already.

image-20240410-003433.png

3. Once the criteria are established, ZMP can run counts for the segment. Remember that the count is in terms of rows, not people.

In some cases, the numbers may be the same, but it is important to learn that depending on how the data is structured, we may be returning duplicate rows for the same user_id.

image-20240410-003517.png

Using Connected Database in Campaigns & Content

  • Once you have created a segment, you can select it like usual, in your campaigns.

Note that if a User ID is not assigned, you will not be able to send a campaign.

  • Within content, you can access the fields marked for personalization by using the {{segment}} tag. You will get an object of the available fields, for example,

    CODE
    {
      "users_id"=>"1518", 
      "users_fname"=>"Zeta", 
      "users_city"=>"New York", 
      "users_state"=>"New York",  
      "users_account_id"=>"A9036205", 
      "users_user_created_on_date"=>"2021-09-06 00:00:00", 
      "users_glbl_user_opt_in"=>"1", 
      "users_glbl_user_opt_out_dt"=>"", 
      "users_user_create_src"=>"site", 
      "uid"=>"zeta@zetaglobal.com"
      }
  • Within the {{segment}} tag, fields will be available with their alias names or original names, if not aliased. Table/fields will be delimited with an underscore, for example, users.id in segmentation will be available as {{segment.users_id}} in content.

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.