From 1298f6479bb9d3719962023849d02e05610890f8 Mon Sep 17 00:00:00 2001 From: Charity Holt <38872070+charholt@users.noreply.github.com> Date: Wed, 28 May 2025 11:25:48 -0400 Subject: [PATCH 1/2] Add set-up retl --- src/connections/reverse-etl/setup.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/connections/reverse-etl/setup.md b/src/connections/reverse-etl/setup.md index c1a7a201ac..0b615b3391 100644 --- a/src/connections/reverse-etl/setup.md +++ b/src/connections/reverse-etl/setup.md @@ -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 automatically stringified when sent to downstream destinations via 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. From df476e59601ab204c27f34274a54e827856369e3 Mon Sep 17 00:00:00 2001 From: rchinn1 Date: Wed, 28 May 2025 10:01:00 -0700 Subject: [PATCH 2/2] Minor edits --- src/connections/reverse-etl/setup.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/connections/reverse-etl/setup.md b/src/connections/reverse-etl/setup.md index 0b615b3391..0fdd98bd7c 100644 --- a/src/connections/reverse-etl/setup.md +++ b/src/connections/reverse-etl/setup.md @@ -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) @@ -172,8 +172,8 @@ 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 automatically stringified when sent to downstream destinations via Reverse ETL. +### 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. @@ -192,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.