Welcome to the Make community!
Yes, that is possible. You’ll need a minimum of three modules, and three operations:
Input showing both cheese breadsticks
Output
As you can see, the URL with duplicate entries, “cheese-breadsticks” have a total of 14906.
Give it a go and let us know if you have any issues!
Module Export
You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.
-
Copy the JSON code below by clicking the copy button when you mouseover the top-right of the code block
-
Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV (paste keyboard shortcut for Windows) to paste directly in the canvas.
-
Click on each imported module and save it for validation. You may be prompted to remap some variables and connections.
JSON
{
"subflows": [
{
"flow": [
{
"id": 96,
"module": "builtin:BasicFeeder",
"version": 1,
"parameters": {},
"mapper": {
"array": "{{95.body.rows}}"
},
"metadata": {
"designer": {
"x": 1099,
"y": -624,
"name": "Iterate Rows"
},
"restore": {
"expect": {
"array": {
"mode": "edit"
}
}
},
"expect": [
{
"name": "array",
"type": "array",
"label": "Array",
"mode": "edit",
"spec": []
}
]
}
},
{
"id": 98,
"module": "builtin:BasicAggregator",
"version": 1,
"parameters": {
"feeder": 96
},
"mapper": {
"dimensionValues": "{{96.dimensionValues}}",
"metricValues": "{{96.metricValues}}"
},
"metadata": {
"designer": {
"x": 1341,
"y": -624,
"name": "Group by URL"
},
"restore": {
"extra": {
"feeder": {
"label": "Iterator [96]"
},
"target": {
"label": "Custom"
}
}
},
"advanced": true
},
"flags": {
"groupBy": "{{96.dimensionValues.1.value}}",
"stopIfEmpty": true
}
},
{
"id": 101,
"module": "util:TextAggregator",
"version": 1,
"parameters": {
"rowSeparator": "\n",
"feeder": 98
},
"mapper": {
"value": "{{98.`__IMTKEY__`}}, {{sum(map(98.array; \"metricValues.1.value\"))}}"
},
"metadata": {
"designer": {
"x": 1583,
"y": -624,
"name": "Sum values in array",
"messages": [
{
"category": "last",
"severity": "warning",
"message": "A transformer should not be the last module in the route."
}
]
},
"restore": {
"parameters": {
"rowSeparator": {
"label": "New row"
}
},
"extra": {
"feeder": {
"label": "Array aggregator [98]"
}
}
},
"parameters": [
{
"name": "rowSeparator",
"type": "select",
"label": "Row separator",
"validate": {
"enum": [
"\n",
"\t",
"other"
]
}
}
],
"expect": [
{
"name": "value",
"type": "text",
"multiline": true,
"label": "Text"
}
],
"advanced": true
},
"flags": {
"stopIfEmpty": true
}
}
]
}
],
"metadata": {
"version": 1
}
}
samliew – request private consultation