Press "Enter" to skip to content

Flattening Data in Snowflake

Kevin Wilkie only believes in two dimensions:

The function FLATTEN takes our JSON object and gives us the ability to put the data into an actual table. If we run the original query above, then we’ll get the data shown below:

Read on for an example using JSON, though as Kevin mentions, FLATTEN() will also work with arrays and XML data.