Pivoting Columns
The Pivot node allows you to transform column values into columns headers, in effect transforming data from a tall/skinny to a short/wide format. This transformation enables quick summarization and extraction of important information from large data sets.
Prerequisite
-
An Execution Profile with an active session linked to the workflow
Steps
-
Produce a Data Frame node by importing a CSV or database table.
-
From the Data Preparation group of the Nodes tabbed page, drag and drop the Pivot node from the Palette to the Workflow Canvas. The Pivot node has one input socket and one output socket. Connect the output socket of the Data Frame node to the input socket of the Pivot node.
-
Configure the Pivot node by opening the Node Viewer. You can double-click on the node or use the Open option provided in the node menu.
-
The Configuration tab displays by default. Specify the following details to configure the Pivot node.
-
All pivots all column values available in the complete data set.
-
Selected Only pivots only the column values available in the preview data set.
-
Check the code that will be executed for your specified Pivot configuration by saving your current configuration and then clicking on the Code tab of the Pivot Node Viewer. You can use the Code Editor to refine the code further.
-
Complete the Pivot Node configuration by clicking Save. To cancel your changes and return to the Workflow Canvas, press Discard or simply close the Pivot Node Viewer. To execute the pivot operation, click the Run button.
Property |
Description |
Case sensitive |
Select the check box to use separate pivot columns in case- sensitive values. |
Aggregate |
Select the check box to apply aggregation functions or summarize groups to the pivot column. |
Group columns |
Click the |
Pivot columns |
Click the |
Columns to include |
Select columns to be included from the input data source for applying functions by clicking f(x) next to the column name and then select the aggregating function check box (Sum, Minimum, Maximum, Average, and so on) and click Apply. The preview table/data grid is displayed based on the input properties. |
Included column names |
Select the prefix or suffix for column names to be included in the pivot. |
Output columns |
Select the output columns (All, Selected Only) for the Pivot node. |
The data grid is updated with records based on the selected pivot and group columns, and the functions.