mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-09 00:42:46 +08:00
91 lines
3.5 KiB
JSON
91 lines
3.5 KiB
JSON
|
|
{
|
||
|
|
"version": "66.0",
|
||
|
|
"nodes": {
|
||
|
|
"LOAD_WEB_ORDERS": {
|
||
|
|
"action": "load",
|
||
|
|
"sources": [],
|
||
|
|
"parameters": {
|
||
|
|
"dataset": {"name": "WebOrders__dlo", "type": "dataLakeObject"},
|
||
|
|
"fields": ["OrderId__c", "Amount__c", "Channel__c"],
|
||
|
|
"sampleDetails": {"type": "TopN", "sortBy": []}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"LOAD_STORE_ORDERS": {
|
||
|
|
"action": "load",
|
||
|
|
"sources": [],
|
||
|
|
"parameters": {
|
||
|
|
"dataset": {"name": "StoreOrders__dlo", "type": "dataLakeObject"},
|
||
|
|
"fields": ["OrderId__c", "Amount__c", "Channel__c"],
|
||
|
|
"sampleDetails": {"type": "TopN", "sortBy": []}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"APPEND_ALL_ORDERS": {
|
||
|
|
"action": "appendV2",
|
||
|
|
"sources": ["LOAD_WEB_ORDERS", "LOAD_STORE_ORDERS"],
|
||
|
|
"parameters": {
|
||
|
|
"allowImplicitDisjointSchema": false,
|
||
|
|
"fieldMappings": [
|
||
|
|
{"targetField": "OrderId__c", "sources": [{"node": "LOAD_WEB_ORDERS", "field": "OrderId__c"}, {"node": "LOAD_STORE_ORDERS", "field": "OrderId__c"}]},
|
||
|
|
{"targetField": "Amount__c", "sources": [{"node": "LOAD_WEB_ORDERS", "field": "Amount__c"}, {"node": "LOAD_STORE_ORDERS", "field": "Amount__c"}]},
|
||
|
|
{"targetField": "Channel__c", "sources": [{"node": "LOAD_WEB_ORDERS", "field": "Channel__c"}, {"node": "LOAD_STORE_ORDERS", "field": "Channel__c"}]}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"SPLIT_BY_AMOUNT": {
|
||
|
|
"action": "split",
|
||
|
|
"sources": ["APPEND_ALL_ORDERS"],
|
||
|
|
"parameters": {
|
||
|
|
"branches": [
|
||
|
|
{"name": "high_value", "expression": "Amount__c >= 1000"},
|
||
|
|
{"name": "low_value", "expression": "Amount__c < 1000"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"OUTPUT_HIGH": {
|
||
|
|
"action": "outputD360",
|
||
|
|
"sources": ["SPLIT_BY_AMOUNT"],
|
||
|
|
"parameters": {
|
||
|
|
"name": "HighValueOrders__dlm",
|
||
|
|
"type": "dataModelObject",
|
||
|
|
"writeMode": "OVERWRITE",
|
||
|
|
"fieldsMappings": [
|
||
|
|
{"sourceField": "OrderId__c", "targetField": "OrderId__c"},
|
||
|
|
{"sourceField": "Amount__c", "targetField": "Amount__c"},
|
||
|
|
{"sourceField": "Channel__c", "targetField": "Channel__c"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"OUTPUT_LOW": {
|
||
|
|
"action": "outputD360",
|
||
|
|
"sources": ["SPLIT_BY_AMOUNT"],
|
||
|
|
"parameters": {
|
||
|
|
"name": "LowValueOrders__dlm",
|
||
|
|
"type": "dataModelObject",
|
||
|
|
"writeMode": "OVERWRITE",
|
||
|
|
"fieldsMappings": [
|
||
|
|
{"sourceField": "OrderId__c", "targetField": "OrderId__c"},
|
||
|
|
{"sourceField": "Amount__c", "targetField": "Amount__c"},
|
||
|
|
{"sourceField": "Channel__c", "targetField": "Channel__c"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"ui": {
|
||
|
|
"nodes": {
|
||
|
|
"LOAD_WEB_ORDERS": {"label": "Web Orders", "type": "LOAD_DATASET", "top": 100, "left": 100},
|
||
|
|
"LOAD_STORE_ORDERS": {"label": "Store Orders", "type": "LOAD_DATASET", "top": 260, "left": 100},
|
||
|
|
"APPEND_ALL_ORDERS": {"label": "Union", "type": "APPEND", "top": 180, "left": 260},
|
||
|
|
"SPLIT_BY_AMOUNT": {"label": "Split by $", "type": "SPLIT", "top": 180, "left": 420},
|
||
|
|
"OUTPUT_HIGH": {"label": "High value", "type": "OUTPUT", "top": 100, "left": 580},
|
||
|
|
"OUTPUT_LOW": {"label": "Low value", "type": "OUTPUT", "top": 260, "left": 580}
|
||
|
|
},
|
||
|
|
"connectors": [
|
||
|
|
{"source": "LOAD_WEB_ORDERS", "target": "APPEND_ALL_ORDERS"},
|
||
|
|
{"source": "LOAD_STORE_ORDERS", "target": "APPEND_ALL_ORDERS"},
|
||
|
|
{"source": "APPEND_ALL_ORDERS", "target": "SPLIT_BY_AMOUNT"},
|
||
|
|
{"source": "SPLIT_BY_AMOUNT", "target": "OUTPUT_HIGH"},
|
||
|
|
{"source": "SPLIT_BY_AMOUNT", "target": "OUTPUT_LOW"}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|