Aggregation Granularity

This component aggregates values in a selected numeric or string column by timestamps extracted from a column of type Date&Time. The granularity of the timestamps and the aggregation method are defined by the user.

If the selected granularity indicates time, the extracted timestamps will have the same column type as the input column. For other granularities (days, months, etc.), the timestamps will appear in a column of type Local Date.

For Quarter and Week granularity, the first date of the corresponding period (quarter or week) will be returned as a column of Local Date type in the output table.

Note: For Legacy Date&Time column please convert it first to Date&Time using the Legacy Date&Time to Date&Time node.

The available granularities are:
Years
Months
Days
Hours
Minutes
Seconds

The supported Date&Time types are:
Local Date Time
Zoned Date Time
Local Date
Local Time

The available aggregation methods are:
Mean
Mode
Min
Max
Sum
Variance
Count

Required extensions:
KNIME Quick Forms
(https://hub.knime.com/knime/extensions/org.knime.features.js.quickforms/latest)

Options

Date&Time Column
The Date&Time column to extract the timestamps at the selected granularity.
Aggregation Column
The numeric or string values to aggregate.
Time Granularity
The granularity of the timestamps that are extracted from the Date&Time column.
Aggregation Method
Aggregation method to apply to the aggregation column.

Input Ports

Icon
A data table containing at least one numeric or string column and one Date&Time column.

Output Ports

Icon
A data table containing the extracted timestamps, aggregated values, and a constant value column containing the selected granularity as string. For Quarter and Week granularity, 2 extra columns will be added: Firstly, a "Year" column containing year values, and secondly, a timestamp as the first date of the corresponding period (quarter or week).

Nodes

Extensions

Links