
Answer-first summary for fast verification
Answer: FLATTEN
The FLATTEN function is specifically designed in Snowflake to explode semi-structured data types (VARIANT, OBJECT, ARRAY) into relational rows. It returns one row for each element in an array or each key-value pair in an object, making it the correct choice for this scenario. CAST is for data type conversion, GET is for extracting specific elements by index/key, and PARSE_JSON is for converting string data to VARIANT format - none of these return multiple rows from a single row input like FLATTEN does. The community discussion confirms this with 100% consensus on answer B and detailed explanations about FLATTEN's table function behavior.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.