Skip to content

Commit daf5841

Browse files
committed
edits
1 parent f839630 commit daf5841

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Supported Object and Arrays
3+
---
4+
5+
When you set up destination actions in Reverse ETL, depending on the destination, some mapping fields may require data to be in the form of an object or array.
6+
7+
## Object mapping
8+
To send data to a mapping field that requires object data, you can choose between these two options:
9+
10+
Option | Details
11+
------ | --------
12+
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.
13+
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. An example is an `Order completed` model with a `Products` column that’s in object format.
14+
15+
> success ""
16+
> 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 the **Customize Object** to ensure your mapping is successful.
17+
18+
Example:
19+
```
20+
{
21+
"product1": {
22+
"productColor": "pink",
23+
"productName": "tshirt"
24+
},
25+
"product2": {
26+
"productColor": "white",
27+
"productName": "skirt"
28+
}
29+
}
30+
```
31+
32+
## Array mapping
33+
To send data to a mapping field that requires array data, the model must to 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.
34+
35+
Example:
36+
37+
```
38+
[
39+
{
40+
"currency": "USD",
41+
"price": 40,
42+
"productName": "jacket",
43+
"purchaseTime": "2021-12-17 23:43:47.102",
44+
"quantity": 1
45+
},
46+
{
47+
"currency": "USD",
48+
"price": 5,
49+
"productName": "socks",
50+
"quantity": 2
51+
}
52+
]
53+
```
54+
55+
To send data to a mapping field that requires array data, you can choose between these two options:
56+
57+
Option | Details
58+
------ | --------
59+
Select array | This enables you to send all nested properties within the array.
60+
Customize array | This enables you to select the specific nested properties to send to the destination.
61+
62+
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. Segmentrecommends you to use the **Customize array** option to ensure successful mapping.
63+
64+
ℹ️ Objects in an array don't need to have same properties. Any missing properties in the input object will be missed from the output object should the user selects that property for a mapping field.
65+

0 commit comments

Comments
 (0)