Collapse Columns
The handler is designated for the table transportation. In this case, headers of the selected columns are moved to the values of rows, and their data is moved to one column. As the data of different types can be moved to this column, Variable data type is used for them.
Source data set:
Client code | Month | SMS number | Number of incoming minutes | Status | Discount availability |
---|---|---|---|---|---|
1 | August | 81 | 506 | constant | True |
1 | September | 32 | 231 | not constant | False |
Let's collapse columns. Client code
and Month
fields will be selected as Info. And SMS number
(Integer type), Number of incoming minutes
(Integer type), Status
(String type), Discount availability
(Logical type) will be selected as Transposed.
Resulting data set:
Client code | Month | Names | Captions | Values | Data Types |
---|---|---|---|---|---|
1 | August | COL3 | SMS number | 81 | 4 |
1 | August | COL4 | Number of incoming minutes | 506 | 4 |
1 | August | COL5 | Status | constant | 5 |
1 | August | COL6 | Discount availability | True | 1 |
1 | September | COL3 | SMS number | 32 | 4 |
1 | September | COL4 | Number of incoming minutes | 231 | 4 |
1 | September | COL5 | Status | not constant | 5 |
1 | September | COL6 | Discount availability | False | 1 |
Input
- Input data source: the port for connection of the input data set.
Output
- Output data set: the table with transposed data set is output to the port.
Wizard
The wizard window is divided into two areas: available fields (to the left) and selected fields (to the right).
- Available fields contain a list of fields of the input data set.
- Selected fields are divided into lists.
- Info: contains the fields that will not be changed.
- On the basis of Transposed fields 4 new columns will be generated: Names, Captions, Values, Data types.
To configure, it is required to move the input data set fields to the Info or Transposed lists, dragging them with the mouse. It can be also done using the navigation buttons.
The resulting data set contains the following columns:
- The source data set columns from the Info list. Their values do not change anyhow.
- The columns generated by the handler.
- Names: the column with the names of the transposed columns.
- Captions: the column with captions of columns.
- Values: this column contains all values of the transposed columns because these columns can be of different type (as in the example), so, the Values column can have Variable type of data.
- Data types: the column that contains information on the data type of values. The types in this column are numerated as follows:
- 0 — Undefined.
- 1 — Logical.
- 2 — Date/time.
- 3 — Real.
- 4 — Integer.
- 5 — String.
- 6 — Variable.
When selecting Skip null values checkbox, the handler won't include the strings with null values in the transposed fields into the resulting data set.