Flatten Variant
  • Dark

Flatten Variant

  • Dark

This article is specific to the following platforms - Snowflake.

Flatten Variant Component

'Flattens' (explodes) compound values into multiple rows. When an input column (of Variant type) contains many values, Flatten Variant can separate those values, giving each their own column.

For this component to be useful, the input data must be condensed in such a way that a single column contains multiple columns worth of data. The expected format is as follows:

{ "<ColumnName>": <Value>, "<ColumnName2>": <Value>", ... }

For example:

{ "Name": "John Bigs", "Age": 32, "Married": TRUE } 

In the example above, this single column can be separated into 3 columns named 'Name', 'Age' and 'Married' with respective types VARCHAR, NUMBER, BOOLEAN.

This component can be used to flatten nested arrays and expose their variables. For a guide on how this works, see the Flattening Nested Arrays page.


Property Setting Description
Name Text The name of the component on the canvas.
Column Mapping Column/Property/Type/Alias Choose an input column and a property from it to take. Each property taken creates a column in the output and each row contains values from each property from its respective row in the input data.
Column Flattens Column/Property/Alias Take a property from an input column and flatten it such that its values constitute another input column. For example, an array value held as a single string in an input column can be flattened, so long as it adheres to the formatting outlined at the top of this article. Columns defined here can be used in the 'Column Mapping' property.

What's Next