Aggregate Data by Time
Description
This activity aggregates data based on a specified time column. The user provides a date column on which the aggregation is performed. The user can specify multiple aggregation columns and types (sum, average, count).
Input
Data only
Output
Transformed data
Configuration Fields
- Time Column The time-based column used for aggregation.
- Period The time period for aggregation (year, day, week, month).
- Aggregations A mapping of column names to aggregation functions.
- Column Name The column to apply the aggregation.
- Aggregation Type The type of aggregation (sum, average, count).
- Include Original If enabled, keeps the input data columns along with the transformed columns.
- Text Strategy Specifies how to handle text columns in grouped data (first or last value of the group).
Sample Input
Order Date | Sales | Units Sold | Transactions | Product Name |
---|---|---|---|---|
2024-01-10 | 500 | 10 | 1 | Product A |
2024-01-15 | 700 | 12 | 1 | Product B |
2024-02-05 | 300 | 5 | 1 | Product A |
2024-02-25 | 900 | 15 | 1 | Product C |
Sample Configuration
Sample Output
Month | Total Sales | Avg Units Sold | Transaction Count | First Product |
---|---|---|---|---|
2024-01-01T00:00:00 | 1200 | 11 | 2 | Product A |
2024-02-01T00:00:00 | 1200 | 10 | 2 | Product A |