COF-C02 · Question #594
Which function can be used to convert semi-structured data into rows and columns?
The correct answer is B. FLATTEN. FLATTEN is a Snowflake table function that explodes semi-structured data (arrays or objects stored in VARIANT columns) into individual rows and columns. For example, a VARIANT array of 5 elements becomes 5 rows with each element accessible as a column. PARSE_JSON (C) parses a…
Question
Which function can be used to convert semi-structured data into rows and columns?
Options
- ATABLE
- BFLATTEN
- CPARSE_JSON
- DJSON EXTRACT PATH TEXT
How the community answered
(38 responses)- B95% (36)
- C3% (1)
- D3% (1)
Explanation
FLATTEN is a Snowflake table function that explodes semi-structured data (arrays or objects stored in VARIANT columns) into individual rows and columns. For example, a VARIANT array of 5 elements becomes 5 rows with each element accessible as a column. PARSE_JSON (C) parses a JSON string into a VARIANT but does not expand it into rows. JSON_EXTRACT_PATH_TEXT (D) extracts a scalar value from JSON. TABLE (A) is a keyword used to invoke table functions, not a transformation function itself.
Topics
Community Discussion
No community discussion yet for this question.