Skip to content

Commit 787d024

Browse files
authored
Merge pull request #4970 from segmentio/DOC-709
RETL Replays, Objects, Arrays [DOC709]
2 parents 0510f4e + d2f9978 commit 787d024

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

src/connections/reverse-etl/index.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ To create a mapping:
109109
5. Select a test record to preview the fields that you can map to your destination in the **Add test record** field.
110110
6. Define how to map the record columns from your model to your destination in the **Select Mappings** section.
111111
* You map the fields that come from your source, to fields that the destination expects to find. Fields on the destination side depend on the type of action selected.
112+
* If you're setting up a destination action, depending on the destination, some mapping fields may require data to be in the form of an object or array. See the [supported objects and arrays for mapping](#supported-object-and-arrays).
112113
7. Click **Create Mapping**.
113114
8. Select the destination you’d like to enable on the **My Destinations** page under **Reverse ETL > Destinations**.
114115
9. Turn the toggle on for the **Mapping Status**. Events that match the trigger condition in the mapping will be sent to the destination.
@@ -133,6 +134,8 @@ To check the status of your extractions:
133134
* The load results - how many successful records were synced as well as how many records were updated, deleted, or are new.
134135
5. If your sync failed, click the failed reason to get more details on the error and view sample payloads to help troubleshoot the issue.
135136

137+
#### Replays
138+
You can choose to replay syncs. To replay a specific sync, contact [[email protected]](mailto:[email protected]). Keep in mind that triggering a replay resyncs all records for a given sync.
136139

137140
### Edit your model
138141

@@ -166,6 +169,71 @@ The Segment Connections destination enables you to mold data extracted from your
166169
> warning ""
167170
> The Segment Connections destination sends data to Segment’s Tracking API, which has cost implications. New users count as new MTUs and each call counts as an API call. For information on how Segment calculates MTUs and API calls, please see [MTUs, Throughput and Billing](/docs/guides/usage-and-billing/mtus-and-throughput/).
168171
172+
## Supported object and arrays
173+
174+
When you set up destination actions in Reverse ETL, depending on the destination, some [mapping fields](#step-4-create-mappings) may require data to be in the form of an [object](#object-mapping) or [array](#array-mapping).
175+
176+
### Object mapping
177+
You can send data to a mapping field that requires object data. An example of object mapping is an `Order completed` model with a `Products` column that’s in object format.
178+
179+
Example:
180+
181+
{
182+
"product": {
183+
"id": 0001,
184+
"color": "pink",
185+
"name": "tshirt",
186+
"revenue": 20,
187+
"inventory": 500
188+
}
189+
}
190+
191+
To send data to a mapping field that requires object data, you can choose between these two options:
192+
193+
Option | Details
194+
------ | --------
195+
Customize object | This enables you to manually set up the mapping fields with any data from the model. If the model contains some object data, you can select properties within the object to set up the mappings as well.
196+
Select object | This enables you to send all nested properties within an object. The model needs to provide data in the format of the object.
197+
198+
> success ""
199+
> Certain object mapping fields have a fixed list of properties they can accept. If the names of the nested properties in your object don't match with the destination properties, the data won't send. Segment recommends you to use **Customize Object** to ensure your mapping is successful.
200+
201+
202+
### Array mapping
203+
To send data to a mapping field that requires array data, the model must provide data in the format of an array of objects. An example is an `Order completed` model with a `Product purchased` column that’s in an array format.
204+
205+
Example:
206+
207+
208+
[
209+
{
210+
"currency": "USD",
211+
"price": 40,
212+
"productName": "jacket",
213+
"purchaseTime": "2021-12-17 23:43:47.102",
214+
"quantity": 1
215+
},
216+
{
217+
"currency": "USD",
218+
"price": 5,
219+
"productName": "socks",
220+
"quantity": 2
221+
}
222+
]
223+
224+
225+
To send data to a mapping field that requires array data, you can choose between these two options:
226+
227+
Option | Details
228+
------ | --------
229+
Customize array | This enables you to select the specific nested properties to send to the destination.
230+
Select array | This enables you to send all nested properties within the array.
231+
232+
> success ""
233+
> Certain array mapping fields have a fixed list of properties they can accept. If the names of the nested properties in your array don't match the destination properties, the data won't send. Segment recommends you to use the **Customize array** option to ensure your mapping is successful.
234+
235+
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.
236+
169237
## Limits
170238
To provide consistent performance and reliability at scale, Segment enforces default use and rate limits for Reverse ETL.
171239

0 commit comments

Comments
 (0)