nerdexam
Snowflake

SOL-C01 · Question #170

You are designing a data ingestion pipeline in Snowflake using Snowsight to load JSON data from an external stage (AWS S3). The JSON files contain nested arrays and objects, and you need to flatten th

Sign in or unlock SOL-C01 to reveal the answer and full explanation for question #170. The question stem and answer options stay visible for context.

Data Loading and Unloading

Question

You are designing a data ingestion pipeline in Snowflake using Snowsight to load JSON data from an external stage (AWS S3). The JSON files contain nested arrays and objects, and you need to flatten the data and load specific fields into a relational table 'FLATTENED DATA' with columns , 'NAME', 'VALUE', and 'TIMESTAMP'. Given the sample JSON structure below, which of the following COPY INTO statement, combined with an appropriate file format, would BEST achieve this goal without requiring a complex transformation process after loading?

Options

  • AUse the = TRUE' file format option and `COPY INTO' with a 'SELECT statement that uses
  • BLoad the entire JSON file into a VARIANT column in a staging table and then use a separate query
  • CCreate an external table pointing to the JSON files and then use a 'CREATE TABLE AS SELECT
  • DUse a file format with ` TYPE = JSON' and = TRUE (if the JSON data is enclosed in an array). In
  • ELoad the JSON files directly into the FLATTENED_DATX table without flattening and rely on

Unlock SOL-C01 to see the answer

You've previewed enough free SOL-C01 questions. Unlock SOL-C01 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#JSON loading#External stages#Nested array flattening#STRIP_OUTER_ARRAY
Full SOL-C01 Practice