MAPPER
inputValue(input 위치에서 찾은 데이터)의 row count 만큼 roof 돌며 각 아이템에 대하여 Mapper Terms 처리 후 output에 반환
Define field
Mapper
ID | Description |
---|---|
id | mapper flow component id |
name | 이름 |
input | flow Component 처리 기준 데이터 위치 |
output | flow Component 처리 결과 위치 |
next | 다음 flow Component id |
Mapper Terms
ID | Description |
---|---|
id | mapper terms id |
field | 가져온 값의 Key 선언
|
method |
(아래 상세설명) |
value | 가져올 값의 위치
|
Mapping Terms Method
ID | Description |
---|---|
Mapping |
|
First |
|
Method |
|
GroupBy |
|
mapper start
next |
SAMPLE mapping
{
"typeId": "mapper",
"id": 100001,
"name": "Cart data by session",
"input": "session",
"output": "cart",
"mapperTerms": [
{ "id": 100002, "field": "id", "method": "mapping", "valueType": "string", "value": "cart.id" },
{ "id": 100003, "field": "node", "method": "mapping", "valueType": "node", "value": "{{:getNode('cart',cart.id)}}" },
{ "id": 100005, "field": "cartProducts", "method": "mapping", "valueType": "referenced", "value": "node.cartProducts" }
],
"next": 100006
}
RESULT
{
"result": "200",
"resultMessage": "SUCCESS",
"node": {
"id": 938757399,
"customer": "233174268",
"site": "bestshop",
"sessionKey": "tjgcsdN_omCD_-LwAyIrnGgx1BgQXhv4BPdfFDLKK1qhlf1Z2xYNsbRygR4NVAjkzcYSlXNCzcGEso4PawLshQ",
"created": "2020-08-03T06:00:04.754+0000",
"changed": "2020-08-03T06:00:04.754+0000"
},
"cartProducts": [
{
"id": 621032550,
"cart": "938757399",
"siteProduct": "1521472672",
"productSingleOption": "111",
"quantity": 2,
"created": "2020-08-03T06:00:04.778+0000",
"changed": "2020-08-03T06:01:09.170+0000"
},
{
"id": 2015258133,
"cart": "938757399",
"siteProduct": "1493590149",
"productSingleOption": "108",
"quantity": 2,
"created": "2020-08-03T06:00:04.783+0000",
"changed": "2020-08-03T06:01:09.178+0000"
}
],
"id": "938757399"
}
SAMPLE groupBy
{
"typeId": "mapper",
"id": 100022,
"name": "Group by cartProductList",
"input": "cartProductList",
"output": "groups",
"mapperTerms": [
{ "id": 100023, "field": "list", "method": "groupBy", "valueType": "list", "value": "siteProduct.productDeliveryInfo.deliveryType,seller.id,siteProduct.productDeliveryInfo.deliveryBundleGroup.id,siteProduct.productDeliveryInfo.productDeliveryFee.deliveryFeeType" }
],
"next": 100122
}
RESULT
{
"result": "200",
"resultMessage": "SUCCESS",
"items": [
{
"siteProduct.productDeliveryInfo.deliveryType": "normal",
"seller.id": "",
"siteProduct.productDeliveryInfo.deliveryBundleGroup.id": 101,
"siteProduct.productDeliveryInfo.productDeliveryFee.deliveryFeeType": "conditional",
"list": [
{
"id": 2015258133,
"cart": "938757399",
"siteProduct": "1493590149",
"productSingleOption": "108",
"quantity": 2,
"created": "2020-08-03T06:00:04.783+0000",
"changed": "2020-08-03T06:01:09.178+0000"
}
]
},
{
"siteProduct.productDeliveryInfo.deliveryType": "normal",
"seller.id": "",
"siteProduct.productDeliveryInfo.deliveryBundleGroup.id": 102,
"siteProduct.productDeliveryInfo.productDeliveryFee.deliveryFeeType": "conditional",
"list": [
{
"id": 621032550,
"cart": "938757399",
"siteProduct": "1521472672",
"productSingleOption": "111",
"quantity": 2,
"created": "2020-08-03T06:00:04.778+0000",
"changed": "2020-08-03T06:01:09.170+0000"
}
]
}
]
}