flatten arrays with different length and values in Snowflake

Viewed 29

I have a column in a table in Snowflake that has arrays in it. I'd like to flatten these arrays so that each one get it's own column. But wait! The arrays in these rows have different lengths, and/or different values!

Say I have

fruit_array
[ "Apple", "Peach", "Plum" ]
[ "Apple", "Chicken"]

How do I end up with a table with columns like:

Apple Peach Plum Chicken
True True True
True True
0 Answers
Related