Exam DEA-C02 Topic 1 Question 195 Discussion
Actual exam question for Snowflake's DEA-C02 exam
Question #: 195
Topic #: 1
Question #: 195
Topic #: 1
A retail company wants to store product data in a Snowflake VARIANT column. The product data is currently in a relational table called 'PRODUCTS' with columns 'PRODUCT ID', 'PRODUCT NAME, 'CATEGORY, 'PRICE, and 'DISCOUNT. They want to create a JSON structure where each product is represented as a JSON object, and the entire result set is a JSON array. Which of the following SQL statements will achieve this transformation most efficiently?


Suggested Answer: B Vote an answer
'JSON ARRAYAGG' is the most efficient way to construct a JSON array from a result set in Snowflake. returns a Snowflake array, which is different from a JSON array. 'TO_JSON' is used to convert a Snowflake VARIANT to a JSON string, and 'ARRAY CONSTRUCT creates a Snowflake array from individual elements. Option E is close but creates an object with single key products and the value being the Array. 'JSON_ARRAYAGG' directly builds a JSON Array.
by Amanda at Jul 31, 2026, 08:27 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).