You can use this step if you need to transform rows into columns. It is the
reverse operation of an
Pivoting a column into several columns means that every unique label found in
that column becomes a column header. The column gets pivoted “around” fixed
columns that you can specify. You also need to specify a value column where
values will be found to fill pivoted columns. If aggregation needs to be
performed, you can choose the aggregation function (
sum by default).
Equivalent to the
PIVOT clause in SQL.
This step is supported by the following backends:
- Mongo 4.2
- Mongo 4.0
- Mongo 3.6
Where to find this step?
- Search bar
Keep columns...: the columns to remain fixed, around which the pivot will occur
Pivot column...: the column to be pivoted
Use values in...: the columns where values are found to fill the pivoted columns
Aggregate values using...: the aggregation function to be used when aggregation has to be performed
Pivot values in ...: for sql translator only, values to keep in value column
This configuration results in: