Transpose Columns
Map sets of input columns into new output columns. This effectively performs an unpivot on the data.
This component re-shapes data by outputting multiple rows for each individual input row. Each set of input columns are mapped to an output column. The output rows are labelled to determine which column the value originated from.
Properties
Name
= string
A human-readable name for the component.
Ordinary Columns
= drop-down
Choose the ordinary columns, those that are not going to be transposed but are still required in the output. These are effectively a set of grouping columns which are passed to the output unchanged.
Row Label Name
= string
Provide the name of a new column name here. It will contain constants you enter into the Column to Row Mapping which identify the original column that the new row originated from.
Output Columns
= column editor
- Name: A new column name to hold the output of multiple input columns.
- Type: Specify the data type for the column. This is Text, Numeric or Datetime, and should be compatible with all input columns that will be mapped into this column. This is used to validate that the input columns all conform to the type of the output column.
Column to Row Mapping
= column editor
- Row Label Name: This editor column will actually appear as the label provided in Row Label Name. Enter an identifier to specify what the rows represent.
- Output Column-1: Each defined output column will appear as a column in this mapping. Add a row to this grid for each input column you want to map into an output column.
- Output Column-n: As above, if you are mapping multiple sets of input columns. When you map data into multiple output columns, there should be a set of similar input columns for each output column. For example, you may have a set of input columns for each quarterly revenue amount, and another set of input columns for quarterly profits. We could add 4 mappings, one for each quarter, into two target variables Revenue and Profit. This works because there are the same number of input columns per output column.
Strategy
Generates a select for each input column, and unions them all together.
Video
Snowflake | Delta Lake on Databricks | Amazon Redshift | Google BigQuery | Azure Synapse Analytics |
---|---|---|---|---|
❌ | ❌ | ✅ | ✅ | ✅ |