nerdexam
SnowflakeSnowflake

SOL-C01 · Question #180

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

The correct answer is A: Create two separate views, one for the CSV files and one for the JSON files, using the. The most effective approach is to create separate views for each file format (CSV and JSON) and then combine them using a UNION ALL' view. This allows you to handle the different schemas of the CSV and JSON files separately and then present a unified view of the data. Options B a

Data Loading and Unloading

Question

You are working with a Snowflake external stage that contains a mix of structured and unstructured data. Specifically, you have a directory in your S3 bucket that contains both CSV files and JSON files. You have enabled directory tables for this stage. You want to create a view that combines data from both the CSV and JSON files. How can you effectively achieve this using the directory table, considering that the CSV and JSON files have different schemas?

Options

  • ACreate two separate views, one for the CSV files and one for the JSON files, using the
  • BCreate a single view that uses the 'METADATA$FILENAME column in the directory table to
  • CCreate a single external table that automatically detects the file format and schema based on the
  • DIt's not possible to combine data from different file formats (CSV and JSON) directly using directory
  • ECreate a stored procedure that reads the directory table metadata, determines the file type for

Explanation

The most effective approach is to create separate views for each file format (CSV and JSON) and then combine them using a UNION ALL' view. This allows you to handle the different schemas of the CSV and JSON files separately and then present a unified view of the data. Options B and E are more complex and less maintainable. Option C is incorrect because external tables do not automatically detect file formats with mixed data types and schemas. Option D is also incorrect as the directory table can be queried directly with appropriate views.

Topics

#Directory Tables#External Stages#File Formats#Data Ingestion

Community Discussion

No community discussion yet for this question.

Full SOL-C01 PracticeBrowse All SOL-C01 Questions