Description
The Extract from Array activity enables the extraction of a specific element or a sub-array from an array-type column in your dataset. You can choose to extract a single item using an index or extract a range of values using a start and end index. This is particularly useful for data flattening, simplification, or isolating relevant subsets of structured arrays.
Use case:
Commonly used when processing JSON arrays, time-series buckets, or nested API data where only a portion of the array is needed for downstream logic or display.
Type | Description |
---|
Data | A dataset containing at least one array-type column |
Output
Type | Description |
---|
Data | Transformed data with extracted array elements |
Configuration Fields
Field Name | Required | Description |
---|
Column Name | Yes | The name of the column containing the array from which to extract values. |
Include Original | No | If enabled, the original dataset is retained along with the new extracted column. If disabled, only the extracted values are included. |
Output Column | Yes | The name of the new column where the extracted values will be stored. |
Extract Sub-Array | No | When enabled, allows extracting a range (sub-array) of values using start and end indexes. |
Index | Conditional | The index of the single element to extract. Required when Extract Sub-Array is disabled. |
Start Index | Conditional | The starting index of the sub-array. Required when Extract Sub-Array is enabled. |
End Index | Conditional | The ending index (inclusive) of the sub-array. Required when Extract Sub-Array is enabled. |
ID | DataArray |
---|
1 | [10, 20, 30, 40, 50] |
2 | [5, 15, 25, 35, 45] |
3 | [100, 200, 300, 400] |
Sample Configuration
Field | Value |
---|
Column Name | DataArray |
Include Original | false |
Output Column | ExtractedValues |
Extract Sub-Array | true |
Start Index | 1 |
End Index | 3 |
Sample Output
ExtractedValues |
---|
[20, 30, 40] |
[15, 25, 35] |
[200, 300, 400] |