Skip to content

Add set-up retl #7640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions src/connections/reverse-etl/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Set up Reverse ETL
beta: false
---

There are four components to Reverse ETL: Sources, Models, Destinations, and Mappings.
There are 4 components to Reverse ETL: Sources, Models, Destinations, and Mappings.

![Reverse ETL overview image](images/RETL_Doc_Illustration.png)

Expand Down Expand Up @@ -172,6 +172,18 @@ Select array | This enables you to send all nested properties within the array.

Objects in an array don't need to have the same properties. If a user selects a missing property in the input object for a mapping field, the output object will miss the property.

### Handling nested objects and arrays
Segment's warehouse pipeline flattens nested fields in context, traits, and properties. As part of this process, any nested arrays or objects within these fields are stringified when sent to downstream destinations with Reverse ETL.

If your destination expects specific fields to be formatted as arrays or objects rather than strings, you'll need to convert the data back to its original structure before mapping.

For example, in Snowflake, you can use the PARSE_JSON function to convert a stringified object or array back to proper JSON format:
```json
SELECT PARSE_JSON(your_column) AS parsed_data
FROM your_table;
Reverse ETL supports reading data in JSON format and can properly convert it to objects or arrays for mapping. This ensures compatibility with destination schemas that require structured data.
```

### Null value management
You can choose to exclude null values from optional mapping fields in your syncs to some destinations. Excluding null values helps you maintain data integrity in your downstream destinations, as syncing a null value for an optional field may overwrite an existing value in your downstream tool.

Expand All @@ -180,9 +192,9 @@ For example, if you opt to sync null values with your destination and an end use
By default, Segment syncs null values from mapped fields to your downstream destinations. Some destinations do not allow the syncing of null values, and will reject requests that contain them. Segment disables the option to opt out of syncing null values for these destinations.

To opt out of including null values in your downstream syncs:
1. Navigate to Connections > Destinations and select the Reverse ETL tab.
1. Navigate to **Connections > Destinations** and select the **Reverse ETL** tab.
2. Select the destination and the mapping you want to edit.
3. Click Edit mapping.
3. Click **Edit mapping**.
4. Under **Optional fields**, select the field you want to edit.
5. In the field dropdown selection, disable the **Sync null values** toggle.

Expand Down
Loading