inputValue(input 위치에서 찾은 데이터)의 row count 만큼 roof 돌며 각 아이템에 대하여 Reducer Terms 처리 후 output에 반환
reducer start
next |
Reducer Terms Method ( Aggregate Functions )
aggregate function calculates and returns a single result for Array
Sum | returns the sum of values in a set of values |
Avg | returns the average of values of a set |
Count | returns the number of values in a set or number of rows |
Min | returns the minimum value in a set of values |
Max | returns the maximum value in a set of values |
Method | Method can be customized |
SAMPLE
{ "typeId": "reducer", "id": 100122, "name": "TotalSalePrice by group", "input": "groups.list", "output": "groups.price", "reducerTerms": [ { "id": null, "field": "totalSalePrice", "method": "sum", "value": "price.salePrice" }, { "id": null, "field": "totalQuantity", "method": "sum", "value": "quantity" }, { "id": null, "field": "totalDiscountSalePrice", "method": "sum", "value": "price.immediateDiscountSalePrice" }, { "id": null, "field": "totalDiscountPrice", "method": "sum", "value": "price.immediateDiscountPrice" } ], "next": 100028 }
RESULT
{ "result": "200", "resultMessage": "SUCCESS", "items": [ { "siteProduct.productDeliveryInfo.deliveryType": "normal", "seller.id": "", "siteProduct.productDeliveryInfo.deliveryBundleGroup.id": 101, "siteProduct.productDeliveryInfo.productDeliveryFee.deliveryFeeType": "conditional", "price": { "totalQuantity": 2, "totalSalePrice": 279000, "totalDiscountSalePrice": 279000, "totalDiscountPrice": 0 } }, { "siteProduct.productDeliveryInfo.deliveryType": "normal", "seller.id": "", "siteProduct.productDeliveryInfo.deliveryBundleGroup.id": 102, "siteProduct.productDeliveryInfo.productDeliveryFee.deliveryFeeType": "conditional", "price": { "totalQuantity": 2, "totalSalePrice": 264000, "totalDiscountSalePrice": 264000, "totalDiscountPrice": 0 } } ] }