---
title: UnPivot an array
description: Expand array values from a selected column into individual output rows.
category: Data Transformation
tags: [unpivot, array, rows, data transformation]
---

# UnPivot an array

## **Description**

The **UnPivot an array** activity expands an array stored in a selected column into multiple rows. Each array element becomes a separate row value in the configured output column.

### **Supported Features**

- **Array expansion**: Converts each array element into its own row.
- **Custom output column**: Writes the expanded element value to `OutputColumn`.
- **Context retention**: Other row values are retained for each expanded array element.
- **Lineage support**: Records that the selected column was folded into individual rows.

---

## **Input**

| Type | Required | Description |
| --- | --- | --- |
| Data | Yes | Input rows containing an array column. |

### **Input Scenarios**

#### **1. Array Of Strings**

| Id | Tags |
| --- | --- |
| 1 | `["A","B","C"]` |

#### **2. Array Of Numbers**

| Id | Scores |
| --- | --- |
| 1 | `[10,20,30]` |

#### **3. Empty Or Null Arrays**

Rows with empty or null arrays depend on transformer behavior and may produce no expanded rows for that input row.

---

## **Output**

| Field | Type | Description |
| --- | --- | --- |
| Data | Array | Transformed rows with one row per array element. The expanded value is stored in `OutputColumn`. |

---

## **Configuration Fields**

| Field Name | Type | Required | Description |
| --- | --- | --- | --- |
| Column | Previous Data Column | Yes | Source column containing the array to expand. |
| OutputColumn | Text | Yes | Name of the output column that stores each array element. |

### **Conditional Field Rendering Rules**

No conditional configuration fields are defined for this activity.

---

## **Sample Input**

| Id | Name | Tags |
| --- | --- | --- |
| 1 | Alice | `["Gold","Retail"]` |
| 2 | Bob | `["Silver"]` |

---

## **Sample Configuration**

| Field | Value |
| --- | --- |
| Column | `Tags` |
| OutputColumn | `Tag` |

---

## **Sample Output**

| Id | Name | Tag |
| --- | --- | --- |
| 1 | Alice | Gold |
| 1 | Alice | Retail |
| 2 | Bob | Silver |
