DEFINITION: Flatten

DEFINITION: Flatten

The Flatten transformation takes an array input column (or list of columns) and generates a new row for each value in the array. When there are multiple columns passed in it will take the crossproduct of the arrays and generate a new record for each value in the resulting array.

Example:
In the example below, the 'Frequency' column is a nested array.  The represents the frequency of when the Farmers Markets occur (weekly, every other week, etc).  Let's Flatten the array so that each value generates a new row.



1. Click on the column header.
2. Choose the Flatten suggestion card.  In the preview, you will see that each value in the array is now a new row.



3. Add to script