
Answer-first summary for fast verification
Answer: VARIANT
Snowflake recommends using the VARIANT data type for semi-structured data when the specific operations to be performed are uncertain. VARIANT is specifically designed to store semi-structured data (JSON, Avro, ORC, Parquet, XML) and provides flexibility to query the data without predefined schemas. It can store arrays, objects, and other complex structures while allowing extraction of values using dot notation or functions like GET_PATH. The community discussion with 100% consensus on D (VARIANT) and the upvoted comment 'Correct because its key value pair' confirms this is the optimal choice. Other options are less suitable: ARRAY (A) and OBJECT (B) are specific structured types that require knowing the data format in advance, while TEXT (C) would store the data as a string, making querying more complex and less efficient.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.