nerdexam
SnowflakeSnowflake

SOL-C01 · Question #115

SOL-C01 Question #115: Real Exam Question with Answer & Explanation

The correct answer is C: Option C. Option C is the most robust. It explicitly specifies the target columns and uses coalesce' to handle cases where customer_id' might be directly in the root or nested within the 'customer' object. Options A and D are incorrect as they don't select specific fields or handle potenti

Data Loading and Unloading

Question

You are loading semi-structured JSON data into a Snowflake table named 'ORDERS'. The JSON files contain nested arrays and occasionally have missing fields. You need to load only the 'order id' and 'customer id' fields. The 'customer id' field is sometimes nested within a 'customer' object, while the 'order id' is always at the top level. Which 'COPY INTO' command is the MOST efficient and resilient way to achieve this, accounting for potential data variations?

Options

  • AOption A
  • BOption B
  • COption C
  • DOption D
  • EOption E

Explanation

Option C is the most robust. It explicitly specifies the target columns and uses coalesce' to handle cases where customer_id' might be directly in the root or nested within the 'customer' object. Options A and D are incorrect as they don't select specific fields or handle potential nesting. B is incorrect as it does not use coalesce function. Option E is also incorrect because it doesn't handle cases where 'customer_id' is not nested within a `customer object.

Topics

#COPY INTO#JSON#Semi-structured data#Data extraction

Community Discussion

No community discussion yet for this question.

Full SOL-C01 PracticeBrowse All SOL-C01 Questions