Transpose Rows Step
The Transpose Rows step creates transposition rules from columns to rows, rotating the data orientation of a table. It moves fields that are horizontal (columns) to a vertical axis (rows) within the data preparation flow. The step is located in the Aggregation category of the toolbar.
How to configure
Define which columns remain as columns in the output and which are transposed to rows. The available fields are:
Column Selection: chooses one or more columns that will be displayed in the output port. At least one column must be selected.
Column Status: indicates whether the column is Valid or Invalid. It becomes invalid when the column is deleted from the input step connected to Transpose Rows, or when the data type of that column is changed at the input. In this status, it is possible to delete the column.
Column: lists all columns coming from the input step. The values are not editable.
Data Type: shows the data type of the input column (Alphanumeric, Numeric, or Date).
Transpose: when checked, the column values are transposed as rows to the output. It is possible to select more than one column.
Key column name: defines the name of the column that will contain the names of the transposed source columns. The system suggests Key Column.
Value column name: defines the name of the column that will contain the transposed values. The system suggests Transposed Values.
Close: closes the screen without saving and returns to the Designer.
Save: saves the settings.
Same data type: to transpose more than one column at the same time, all must be of the same data type.
Configuration example
Consider an input table with the columns Business, Date, Account, Value, and Description. For example: Business A, 11/14/2022, Account 1001, Value 100, Description "Expenses 1".
For the transposition rule, mark the Business and Account columns as Transpose, while keeping Date, Value, and Description as output columns.
In the output, each original row generates two rows: one with the Key Column = "Business" and the corresponding value (for example, "A"), and another with the Key Column = "Account" and the corresponding value (for example, "1001"). The retained columns (Date, Value, and Description) are repeated in each of these rows.
Related articles
Transpose Columns Step