> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Create a table from an array (Beta)

> Create a table from an array in Sigma using Unnest to expand or flatten array items or a column of arrays.

This documentation describes one or more public beta features that are in development. Beta features are subject to quick, iterative changes; therefore the current user experience in the Sigma service can differ from the information provided in this page.

This page should not be considered official published documentation until Sigma removes this notice and the beta flag on the corresponding feature(s) in the Sigma service. For the full beta feature disclaimer, see [Beta features](/docs/sigma-product-releases#beta-features).

You can create a table based on the items in an array or a column of arrays using the **Unnest** operation.

For example, the table below shows a single row with an *Array* column containing an array with three items.

![A table named Array shows one row with an array with three items, the numbers 1, 2, and 3](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/c455387013c7a21b7911d90c346247a4bf57bdafd198102a1c3e884ce0487f12/assets/images-archive/4ae9889c2c9cc454436d51aaf0d5a8ffa251eff441a40cad2d4bc2e0dd2d4bda-array_column.png)

To shape the data such that each array item appears in its own row, you can unnest the *Array* column. The result is a table with three rows, where each array item has been separated onto its own row.

![A table named Unnest of Array shows three rows, containing the values 1, 2, and 3, across the three rows respectively](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/4c6cd4eb1925cf8aec330c1284499aafcf7e80d0e0a6d8add165fb8edfd1323f/assets/images-archive/8b94be9ae7fa8d0011c99b79c7bc68180f68c1f3c211e18193137002803719e8-unnested_arry.png)

Optionally, you can add an index column to show the position of each item in the original array, or include the original array itself in a column next to each array item.

Unnesting is especially useful when working with deeply nested data, or when data is stored as an array in your data platform. If you want each value in an array to behave as an individual data point that you can group, aggregate, or filter on, unnest the arrays to get individual rows.

This document explains how to unnest an array column into a table.

## User requirements

* You must be the workbook owner or be granted **Can explore** or **Can edit** access to the document.

## Notes

* Your selected data source must have a column with the **Variant** [data type](/docs/data-types-and-formats#variant) to unnest.
* You can only unnest arrays from the top level of a variant column. For example, you cannot unnest an array defined within a property of a JSON object.

## Unnest an array column

You can unnest an array column to unpack each item in the array into its own row. All other columns in the table repeat their source value for each new row in the expanded table.

To unnest an array column:

1. From the **Add element** bar, select **Table** > **Data** > **Unnest**.
2. In the **Select source** modal, select the data source or element with an array column to unnest.
3. Click **Select**.
4. In the **Unnest table** modal, select an **Array column** to unnest. Only columns with the **Variant** [data type](/docs/data-types-and-formats#variant) are available to select.
5. Enter a **Values column label** to set the column name for the column of unnested array values.
6. (Optional) Check the checkbox next to **Include index column** to add a column that lists the zero-indexed position for each item in the original array.
7. (Optional) If you checked the checkbox next to **Include index column**, enter an **Index column label** to set a custom name for the column of index values.
8. Select the checkboxes next to your desired **Output columns** to determine which columns appear in the final output table. Review the columns in the **Output preview** to see the resulting contents.
9. Select **Submit**.

A new table with the unnested array contents appears on the workbook canvas.

### Example: Expand a product tags array into multiple rows

In an example scenario, imagine a table called **Products** where one row represents a product that a customer can order. In the **Products** table, there is a column, *product\_tags* that contains an array of all the metadata tags that apply to that product.

![The "Products" table shows a handful of products, with an array column showing multiple tags per product](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/442d90e4465ffca0564f957f8f1e9e7c16ae0e2d49e8b4df694d6d1fa27aa7f2/assets/images-archive/71cae18b1430f167713dc422e15d59d861c52f4070c74009926225d146808b7d-products.png)

If you want to analyze the performance of particular product tags, you can unnest the product tags array, so that each tag can be filtered or grouped independently:

1. From the **Add element** bar, select **Table** > **Data** > **Unnest**.

2. In the **Select source** modal, select the **Products** table element.

3. Click **Select**.

4. In the **Unnest table** modal, configure the following fields:

   | Field                    | Setting                                                                                              |
   | :----------------------- | ---------------------------------------------------------------------------------------------------- |
   | **Array column**         | Select the *product\_tags* column.                                                                   |
   | **Values column label**  | Enter **tag**.                                                                                       |
   | **Include index column** | Check the checkbox to add an index column.                                                           |
   | **Index column label**   | Enter **tag index**.                                                                                 |
   | **Output columns**       | Check the boxes next to *product\_id*, *product\_name*, *category*, *price*, *tag*, and *tag index*. |

5. Select **Submit**.

The **Unnest of Products** table appears on the workbook canvas, with each value from the original *product\_tags* array on its own row.

![The Unnest of Products table shows one row for each tag on each product, an index column shows the zero-indexed position of each item in its original array](https://files.buildwithfern.com/sigma.docs.buildwithfern.com/96681ed5152b44776ab5293dee96014dae2560dfee5529446b8716a98529186b/assets/images-archive/02ec8d1ffd6fb9f6a5fdce8358df26e5e1323ecb69e42c64c10ba0886e1e6396-unnest_of_products.png)

When performing aggregate calculations on unnested data, such as in table summaries or grouping calculations, avoid counting a row value from the original table multiple times in the calculation logic.

For example, each row in the **Unnest of Products** table represents one tag on one product. Because of this, there are multiple rows for each product from the original table. Because some products are now represented on more rows than others, calculating the average of all values in the *price* column would give a different result than the actual average price of those products.

## Related resources

* [Extract columns from JSON or variant data](/docs/extract-columns-from-json-or-variant-data)
* [Supported data types and formats](/docs/data-types-and-formats)
* [Create and manage tables](/docs/create-and-manage-tables)