> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# INLINE

> Expands ARRAY&lt;STRUCT&gt; elements into rows with one output column per struct field.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Table function</span></div>

NULL array emits no rows. A NULL struct element emits one all-NULL row.

## Syntax

### Table

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
inline(collection)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| collection | ARRAY\<STRUCT\<...>> | Yes | Array of records to expand. Each STRUCT field has a declared name and SQL type: BOOLEAN, TINYINT, SMALLINT, INTEGER, BIGINT, FLOAT, DOUBLE, DECIMAL(p, s), STRING, BINARY, DATE, TIME, TIMESTAMP, ARRAY, MAP or STRUCT. All array elements share that struct schema; output columns preserve its field types. |

## Returns

* Type: TABLE with the struct field types
* NULL behavior: NULL array emits no rows. A NULL struct element emits one all-NULL row.
* Empty input: No rows for an empty array.
* Shape: The output has one column for each struct field, with the element field types.
* Ordering: Input element order is preserved by expansion; SQL output order requires ORDER BY.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Yes |

## Usage notes

* Deterministic: The same inputs and settings produce the same result.

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT a, b FROM TABLE(inline(ARRAY(named_struct('a', 1, 'b', 'x'), named_struct('a', 2, 'b', 'y')))) AS t(a, b) ORDER BY a;
```

| a | b |
| - | - |
| 1 | x |
| 2 | y |

### Expand structs with boolean fields

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT name, active FROM TABLE(inline(ARRAY(named_struct('name', 'Ada', 'active', TRUE), named_struct('name', 'Lin', 'active', FALSE)))) AS t(name, active) ORDER BY name;
```

| name | active |
| - | - |
| Ada | true |
| Lin | false |

## Limitations

* Exactly one ARRAY\<STRUCT> argument is required.

## Related functions

* [inline\_outer](/query/sql/functions/table/inline_outer)
* [explode](/query/sql/functions/table/explode)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.