SnowPro Advanced: Architect — Question 124
An Architect needs to automate the daily import of two files from an external stage into Snowflake. One file has Parquet-formatted data, the other has CSV-formatted data.
How should the data be joined and aggregated to produce a final result set?
Answer options
- A. Use Snowpipe to ingest the two files, then create a materialized view to produce the final result set.
- B. Create a task using Snowflake scripting that will import the files, and then call a User-Defined Function (UDF) to produce the final result set.
- C. Create a JavaScript stored procedure to read, join, and aggregate the data directly from the external stage, and then store the results in a table.
- D. Create a materialized view to read, join, and aggregate the data directly from the external stage, and use the view to produce the final result set.
Correct answer: A
Explanation
The correct answer is A because using Snowpipe allows for automated ingestion of both files in different formats, and a materialized view can efficiently create the final result set by handling the aggregation and joining. Options B and C involve additional complexity with scripting or procedures that are unnecessary for this task, while option D incorrectly suggests using a materialized view directly on the external stage, which is not feasible.