Pivot Processor

Pivot is an aggregation processor where one of the grouping columns have distinct values which later gets transposed to form individual columns. These column values further help in data analysis and reporting.

Pivot Processor Configuration

To add Pivot processor into your pipeline, drag the processor to the canvas and right click on it to configure.

FieldDescription
Grouping FieldsAll fields of selected message will be displayed here.Select the fields on which groping has to be done.
Pivot ColumnAll columns of selected message will be listed here.Select the column which is to be considered as Pivot column.
Pivot ValuesEnter the comma separated values which are to be transposed to different columns.
Type of aggregationAll aggregation functions will be listed here. Select the function which is to be applied to the fields.
Aggregation ColumnAll columns of selected message will be listed here. Select the column on which aggregation is to be applied.
Time Window

Time window options.

None: Does not apply the window operation on data.

Fixed Window: Window length and sliding interval remains same.

Sliding Window: Enables to configure the window length and sliding interval.

Window DurationTime window in seconds.
Slide DurationWindow slide duration in seconds.
Event ColumnMessage field of type time stamp.
ADD CONFIGURATIONAdditional properties can be added using ADD CONFIGURATION link.

Click on the NEXT button. You can view the new schema based on your pivot configuration on Schema tab.

Click SAVE for getting the final output of pivot processor.

Example:

A dataset comprising of five records has four fields: “OrderId”, “Product”, “Category” and “Amount”.

To group on the basis of field “Product”, pivot on column “Category” and type of aggregation to be applied is “SUM” on column “Amount”.

The Pivot processor applies the aggregation operation(SUM) on the Pivot column and creates pivot table.

Since, you have applied the operation “SUM” on column “Amount”, it will calculate the sum of different vegetables and fruits.

Sum of the fruits banana is 300, vegetable broccoli is 400 whereas carrot is 100.

If no amount is found for a particular vegetable, it will show null values against the product.

Top