Transpose Columns
Transpose Columns is a transformation component that maps sets of input columns into new output columns. This effectively performs an UNPIVOT on the data.
This component reshapes data by outputting multiple rows for each individual input row. Each set of input columns is 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
= dual listbox
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 that are passed to the output unchanged.
To use grid variables, tick the Use Grid Variable checkbox at the bottom of the Ordinary Columns dialog. For more information, read Grid Variables.
Row Label Name
= string
Provide the name of a new column here. It will contain constants you enter into the Column to Row Mapping property, which identifies 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. 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. Choose from the following data types:
- VARCHAR: This type is suitable for numbers and letters. A varchar or Variable Character Field is a set of character data of indeterminate length.
- NUMBER: This type is suitable for numeric types, with or without decimals.
- FLOAT: This type of values are approximate numeric values with fractional components.
- BOOLEAN: This type is suitable for data that is either "true" or "false".
- DATE: This type is suitable for dates without times.
- TIMESTAMP: This type is a timestamp left unformatted (exists as Unix/Epoch Time).
- TIME: This type is suitable for time, independent of a specific date and timezone.
- VARIANT: Variant is a tagged universal type that can hold up to 16 MB of any data type supported by Snowflake.
To use grid variables, tick the Use Grid Variable checkbox at the bottom of the Output Columns dialog. For more information, read Grid Variables.
Toggle Text Mode to add information to the Output Columns dialog. For more information, read Text mode.
Column to Row Mapping
= 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.
To use grid variables, tick the Use Grid Variable checkbox at the bottom of the Column to Row Mapping dialog. For more information, read Grid Variables.
Name
= string
A human-readable name for the component.
Ordinary Columns
= dual listbox
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 that are passed to the output unchanged.
To use grid variables, tick the Use Grid Variable check box at the bottom of the Ordinary Columns dialog. For more information, read Grid Variables.
Row Label Name
= string
Provide the name of a new column here. It will contain constants you enter into the Column to Row Mapping property, which identifies 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. 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. Choose from the following data types:
- TEXT: A string that can hold any kind of data, subject to a maximum size.
- INTEGER: An integer data type is suitable for whole numbers (no decimals).
- NUMERIC: The numeric data type accepts numbers, with or without decimals.
- REAL: This type is suitable for data of a single precision floating point number.
- DOUBLE PRECISION: This type is suitable for data of a double precision floating point number.
- BOOLEAN: Data with a Boolean data type can be either "true" or "false".
- DATE: This type is suitable for dates without times.
- DATETIME: This type is suitable for dates, times, or timestamps (both date and time).
- SUPER: Uses the SUPER data type to store semi-structured data or documents as values.
To use grid variables, tick the Use Grid Variable check box at the bottom of the Output Columns dialog. For more information, read Grid Variables.
Toggle Text Mode to add information to the Output Columns dialog. For more information, read Text mode.
Column to Row Mapping
= 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.
To use grid variables, tick the Use Grid Variable check box at the bottom of the Column to Row Mapping dialog. For more information, read Grid Variables.
Snowflake | Databricks | Amazon Redshift |
---|---|---|
✅ | ❌ | ✅ |