Aggregate
Type:
aggregate• Category:flow
Description
Aggregate list of numbers
Parameters
| Name | Type | Description | Required | Default |
|---|---|---|---|---|
listPath | string | Path to list in context (e.g. 'data.items') | no | |
operation | string | no | "sum" |
Help
Aggregate Worker
Performs mathematical aggregation operations on lists of numbers.
How it works:
- Data Extraction: Finds numeric values from specified list in context
- Calculation: Applies selected aggregation operation
- Result: Returns single aggregated value
Parameters:
- listPath: Path to list in context (e.g., 'data.items', 'vars.prices')
- operation: Aggregation function to apply
Available Operations:
- sum: Sum of all values
- avg: Average (mean) of values
- min: Minimum value
- max: Maximum value
- count: Count of numeric values
- median: Middle value when sorted
- std: Standard deviation
- first: First value in list
- last: Last value in list
- unique: Count of unique values
- percentile_25: 25th percentile
- percentile_50: 50th percentile (same as median)
- percentile_75: 75th percentile
Examples:
- Sum prices: listPath="data.prices", operation="sum"
- Average scores: listPath="vars.test_scores", operation="avg"
- Count items: listPath="data.items", operation="count"
Data Processing:
- Automatically filters to numeric values only
- Ignores non-numeric items in lists
- Returns None for empty lists or no numeric values
Common Use Cases:
- Calculate totals and averages
- Find min/max values in datasets
- Count items meeting criteria
- Statistical analysis of numeric data
- Financial calculations (totals, averages)
Notes:
- Works with any list containing numbers
- Supports nested object access (data.items.prices)
- Statistical functions require sufficient data points