Data Mapping with JSON

Specify data mappings for Reverse ETL connections via JSON.

RudderStack provides the following options to map your warehouse columns to specific destination fields while importing the data:

This guide lists the JSON mapping settings required to sync data from your warehouse sources to the specified destinations.

Mapping configuration

  • Sync mode: Select the sync mode from Upsert or Mirror that RudderStack uses to sync your data.
  • Event Type: Select from the identify or track event type depending on how you want to send the event data to the downstream destinations.
warning
RudderStack does not support track event type for Mirror mode.

If you select track, you also need to provide:

  • Event Name: Enter the event name which should be sent for all events to the downstream destinations:
Schema tab options in RudderStack

You can also send different event names by enabling the lookup event name by column setting and specifying the column name which should be used to set the event name in the Event Name field:

Schema tab options in RudderStack
info
See Syncing Events for more information on sending event data as identify or track events.
  • Choose user identifier: Choose at least one user identifier from user_id and anonymous_id from the dropdown.

You can preview the data snippet which RudderStack sends to the destination. All the columns from the table are selected by default. However, you can choose to retain specific columns by searching and selecting or deselecting them.

You can also search the columns by a keyword and edit the JSON Trait Key column. RudderStack automatically generates the resulting preview on the right:

JSON data preview

The resulting JSON payload carries the user_id and anonymous_id from the columns selected in the Choose user identifier section. Moreover, the traits are used from the columns selected in the Column section.

Add Constant

You can also use the Add Constant option to add a constant key-value pair which is always sent in the JSON payload:

Add constant

The new constant will appear in the table and also in the JSON preview inside the traits, as shown:

Updating table selection

You can also use the dot notation to define a constant, as shown:

Updating table selection

Once you have finalized the configuration, click Save.

Update mapping configuration

info

Note the following:

  • You can update your mapping configuration irrespective of whether the connection is turned on or off.
  • While updating the mapping configuration, you cannot change the Sync mode, Event type, and User identifier fields. You will have to delete the destination and connect a new destination from scratch to do so.
  1. Go to the Schema tab of your Reverse ETL connection page.
  2. Update the mappings as required by selecting/deselecting the required fields.
  3. Click Save to update the configuration.
Update JSON mappings


Questions? Contact us by email or on Slack