# Unpivot
> Supported in: Batch, Faster, Streaming
Unpivot is the opposite operation of pivot. This converts multiple columns into rows, transforming data from a wide format to a long format. To do so it creates two new columns: one containing the original column names as values, and another containing the corresponding data values. All other columns that are not unpivoted are kept as is.
**Transform categories**: Aggregate, Popular
## Declared arguments
* **Columns to unpivot:** List of columns to unpivot.
*List\>*
* **Dataset:** Dataset to perform unpivot on.
*Table*
* **Name column:** The output column that contains the column names from the original dataset.
*Literal\*
* **Value column:** The output column that contains the values from the original dataset.
*Literal\*
**Type variable bounds:** *T accepts AnyType*
## Examples
### Example 1: Base case
**Argument values:**
* **Columns to unpivot:** \[`new_york_miles`, `london_miles`]
* **Dataset:** ri.foundry.main.dataset.a
* **Name column:** city
* **Value column:** miles
**Input:**
| airline | new\_york\_miles | london\_miles |
| ----- | ----- | ----- |
| foundry airways | 1000 | 6000 |
| new air | *null* | 8000 |
**Output:**
| city | miles | airline |
| ----- | ----- | ----- |
| new\_york\_miles | 1000 | foundry airways |
| london\_miles | 6000 | foundry airways |
| new\_york\_miles | *null* | new air |
| london\_miles | 8000 | new air |
***
### Example 2: Base case
**Argument values:**
* **Columns to unpivot:** \[`new_york_miles`, `london_miles`]
* **Dataset:** ri.foundry.main.dataset.a
* **Name column:** city
* **Value column:** miles
**Input:**
| airline | new\_york\_miles | london\_miles | miles |
| ----- | ----- | ----- | ----- |
| foundry airways | 1000 | 6000 | 0 |
| new air | *null* | 8000 | 0 |
**Output:**
| city | miles | airline |
| ----- | ----- | ----- |
| new\_york\_miles | 1000 | foundry airways |
| london\_miles | 6000 | foundry airways |
| new\_york\_miles | *null* | new air |
| london\_miles | 8000 | new air |
***