Skip to content

Extract from array

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.


Input

TypeDescription
DataA dataset containing at least one array-type column

Output

TypeDescription
DataTransformed data with extracted array elements

Configuration Fields

Field NameRequiredDescription
Column NameYesThe name of the column containing the array from which to extract values.
Include OriginalNoIf enabled, the original dataset is retained along with the new extracted column. If disabled, only the extracted values are included.
Output ColumnYesThe name of the new column where the extracted values will be stored.
Extract Sub-ArrayNoWhen enabled, allows extracting a range (sub-array) of values using start and end indexes.
IndexConditionalThe index of the single element to extract. Required when Extract Sub-Array is disabled.
Start IndexConditionalThe starting index of the sub-array. Required when Extract Sub-Array is enabled.
End IndexConditionalThe ending index (inclusive) of the sub-array. Required when Extract Sub-Array is enabled.

Sample Input

IDDataArray
1[10, 20, 30, 40, 50]
2[5, 15, 25, 35, 45]
3[100, 200, 300, 400]

Sample Configuration

FieldValue
Column NameDataArray
Include Originalfalse
Output ColumnExtractedValues
Extract Sub-Arraytrue
Start Index1
End Index3

Sample Output

ExtractedValues
[20, 30, 40]
[15, 25, 35]
[200, 300, 400]