Skip to main content

Aggregator examples

The Aggregations tab has examples under Start from an example. Each opens unsaved in the workspace, so you can run it, change it and save it under your own name. They are also a quick way to learn a stage: each one uses a different mix. The Report properties group shows aggregations that one report or another can fill in differently.


The examples​

GroupExampleServiceShows
Fusion AIFusion AI tokens by userFusion AI usage$match on a date range, $group, $sort, $project
Fusion AIFusion AI tokens by dayFusion AI usageCounting distinct users with $addToSet and $size
Fusion AIHeaviest Fusion AI conversationsFusion AI usage$first, $sort and $limit for a top 20
Fusion AIPlaybook runs by statusFusion AI playbook runsGrouping by two fields
Fusion AIScheduled playbook tasksFusion AI tasksA filtered list without grouping
AutomationsAutomation failures by targetAutomation logs$max for the latest failure, $last for its message
AutomationsAutomation runs by dayAutomation logs$set with $dateToString to group by day
AutomationsAutomations by target and serviceAutomationsGrouping the automation conditions
AutomationsAutomation success rate by targetAutomation logs$cond, $divide and $round to calculate a percentage
Data and master dataData by typeDataA count per type
Data and master dataMaster data by typeMaster data objectsA count per type, top 50
Data and master dataData overview in one rowData$facet: a total, a count per type and the latest updates together
Data and master dataDataset deliveries by statusDataset deliveries (common)$sortByCount for the deliveries of the ondate
PlatformScripts by categoryScriptsA count and the latest change per category
PlatformRecently changed scriptsScripts$sort, $limit and renaming fields
PlatformReports by type and scheduleReport configurations$cond and $ifNull
Report propertiesFusion AI usage for one userFusion AI usage@{user} in a $match, with a date range
Report propertiesConversations over a token thresholdFusion AI usage@{minTokens} in a $match after the $group, read as a number
Report propertiesRuns of one playbookFusion AI playbook runs@{playbook} in a $match
Report propertiesFailures of one automation targetAutomation logs@{target} in a $match, $sort and $limit for the latest 100
Report propertiesDeliveries of a group of datasetsDataset deliveries (common)@{datasets} as a $regex on the dataset ID

Examples with report properties​

The examples in the Report properties group each use a report property. Save one once, then make a report for each value you need: the aggregation stays the same and each report sets its own value under Report properties.

ExamplePropertyTest valueReports you could make
Fusion AI usage for one useruserYour own email addressOne monthly report for each person, emailed to them
Conversations over a token thresholdminTokens100000A weekly check at 500000 for the finance team, and a daily one at 100000 for the platform team
Runs of one playbookplaybook#process-failure-triageOne report for each playbook you run on a schedule
Failures of one automation targettargetodsl.emailOne report for each target its owner looks after, such as odsl.email and odsl.curve
Deliveries of a group of datasetsdatasets.* (every dataset)^ICE_ for the ICE desk, ^EEX_ for the power desk, as in One aggregation, several reports
tip

A threshold such as minTokens is written in the stage as a string, "@{minTokens}". The platform reads a string that looks like a number as a number, so the comparison works. See How values are read.


From an example to Northgate Energy's report​

Dataset deliveries by status counts the day's deliveries for each status. It is a good first look, and it answers "how many are late?". Northgate Energy's market data team wanted to know which ones, so they replaced its $sortByCount with a $project and a $sort, as in Building an aggregation, and kept the same $match:

{"ondate": "@{ondate}"}

Next​

Reference: where everything is saved, and what to do when something goes wrong.