COF-C02 · Question #172
Which TABLE function helps to convert semi-structured data to a relational representation?
The correct answer is C. FLATTEN. FLATTEN is a Snowflake table function that takes semi-structured data (such as VARIANT, ARRAY, or OBJECT columns) and explodes it into a relational, row-based format. It iterates through the elements of an array or object and returns one row per element, making it easy to query…
Question
Which TABLE function helps to convert semi-structured data to a relational representation?
Options
- ACHECK_JSON
- BTO_JSON
- CFLATTEN
- DPARSE_JSON
How the community answered
(41 responses)- A7% (3)
- B5% (2)
- C88% (36)
Explanation
FLATTEN is a Snowflake table function that takes semi-structured data (such as VARIANT, ARRAY, or OBJECT columns) and explodes it into a relational, row-based format. It iterates through the elements of an array or object and returns one row per element, making it easy to query nested or hierarchical data using standard SQL. CHECK_JSON validates whether a string is valid JSON, TO_JSON converts a VARIANT value to a JSON string, and PARSE_JSON parses a JSON string into a VARIANT value - none of these convert semi-structured data into relational rows.
Topics
Community Discussion
No community discussion yet for this question.