Intro
There are three available tiles under Pivot in Magic ETL:- Dynamic Unpivot
- Pivot
- Unpivot
Learn about the available tiles:
Dynamic Unpivot Tile

Example
For example, the Dynamic Unpivot tile converts data where two products (Product A and Product B) appear in separate columns…

Product column.

- In step 1 of the Dynamic Unpivot tile editor, choose Month. This column is not pivoted.
- In step 2, name the column that will hold the pivoted column names. In this example, this column name is
Product. - In step 3, name the column that will hold the pivoted column values. In this example, this column name is
Sales.

- Drag the Dynamic Unpivot tile to the canvas and connect it to the rest of your flow.
-
(Optional) Rename the tile. In the Configuration tab of the tile editor, select
Edit.

- In step 1 of the tile editor, enter the name of the column that you DO NOT want to be pivoted. This will duplicate the value in this row per column that is being pivoted.
- In step 2, name the column you want to create to contain the column headings from the columns to unpivot.
- In step 3, name the column you want to create to contain the row values from the columns to be unpivoted.
Pivot Tile

Note: If you create a table that reaches the 1500-column limit, you will receive an error. You must reduce the number of columns to continue running your Magic ETL DataFlow.


- In step 1 of the Pivot tile editor, choose Product.
- In step 2, select the column(s) that identify a row. In this example, the column is
Month. - In step 3, name the new column(s) to create. In this example, three columns are created,
Product A,Product B,andProduct C. - In step 4, provide the label that identifies the rows that belong in each new column. In this example, the labels are
A,B,andC. - In step 5, select what column values will populate the new column. In this example, the column for each product is
Sales.

- Drag the Pivot tile to the canvas and connect it to the rest of your flow.
-
(Optional) Rename the tile. In the Configuration tab of the tile editor, select
Edit.
- Enter the name of the key column you want to pivot into new column headers. For example, “Product”.
- Select the column to use to group the row values of the new columns. For example, “Month”.
-
For each new column you want to create from the key column, do the following:
- Enter the name of the new column header. For example, “Product A”.
- Enter a value from the key column that represents the column header to be pivoted. For example, “A”.
- Select the value column to use to fill the row value of the new column.
- For example, “Sales”.
Note: For each column you add to be pivoted, select the same value column.- (Conditional) If you want to add another column, then click Add Column.
Unpivot Tile




- Click the Unpivot tile in the canvas.
-
(Optional) Rename the tile by clicking
, then entering the name you want.
- Enter the name of the column you want to create to contain the column headings from the columns to unpivot. For example, “Product”.
- Enter the name of the column you want to create to contain the row values from the columns to be unpivoted. For example, “Sales”.
-
For each column you want to unpivot, do the following:
- Select a column to normalize. For example, “Product A”.
- Enter a value representing the column header to be normalized. The value appears in the row of the new column. For example, “A”.
- (Conditional) If you want to unpivot another column, then click Add Column.
