SnowPro Core Certification — Question 686
A JSON file that contains lots of dates and arrays needs to be processed in Snowflake. The user wants to ensure optimal performance while querying the data.
How can this be achieved?
Answer options
- A. Flatten the data and store it in structured data types in a flattened table. Query the table.
- B. Store the data in a table with a VARIANT data type. Query the table.
- C. Store the data in a table with a VARIANT data type and include STRIP_NULL_VALUES while loading the table. Query the table.
- D. Store the data in an external stage and create views on top of it. Query the views.
Correct answer: A
Explanation
The correct answer is A because flattening the data and using structured data types allows for more efficient querying and better performance in Snowflake. Options B and C, while they utilize VARIANT data types, may not provide the same level of performance as structured tables for complex queries. Option D does not optimize performance as it relies on external stages and views, which can introduce additional overhead.