Correct Answer: C,E
Comprehensive and Detailed Explanation From Exact Extract:
* Why C (To query a list of staged files that reside in internal or external storage) is correct:
According to the Snowflake documentation on directory tables, a directory table provides metadata about staged files (both in internal and external stages). When the ENABLE_DIRECTORY_LISTING parameter is set to TRUE for a stage, Snowflake automatically maintains a directory table that lists information such as file names, sizes, ETags, and last modified timestamps.
From Snowflake documentation:
"A directory table provides metadata about the files in a stage, such as file name, size, and last modified date.
This allows users to query a list of files residing in internal or external stages." This makes directory tables highly useful for data pipelines, where it's necessary to monitor, process, or filter specific files in a stage (for example, incremental file processing).
* Why E (To join data with a Snowflake table that contains unstructured file metadata) is correct:
Directory tables are also used to join staged file metadata with Snowflake tables. This is especially useful when processing unstructured data (e.g., JSON, images, or text) stored in stages.The directory table's metadata can be joined with metadata extracted from the unstructured file contents or with other tables that store relevant contextual data, enabling advanced data pipeline operations such as data lineage tracking, incremental ingestion, or file-based ETL workflows.
Snowflake documentation explicitly states:
"You can query and join directory tables with other tables in Snowflake to combine staged file metadata with structured data for downstream processing or analysis."
* Why A (To query structured data residing in an external stage) is incorrect:Directory tables don't query the actual data contents of files; they provide metadata about the files themselves. Structured data in external stages is queried using external tables, not directory tables.
* Why B (To unload the results of unstructured file processing) is incorrect:Directory tables do not handle data unloading or storage of processed results. Their function is limited to metadata listing and management.
* Why D (To store role-based access control information for unstructured data) is incorrect:
Directory tables are not security or access-control objects. They do not manage permissions or RBAC data. Access control is handled through Snowflake's role-based security model, not directory tables.
References (Snowflake SnowPro Core / Study Guide / Official Documentation):
* Snowflake Documentation - Directory Tables:
"A directory table provides metadata about files in a stage. When enabled, it allows querying and joining staged file metadata with Snowflake tables."
* Snowflake Documentation - Data Loading with Directory Tables:
"Use directory tables to track staged files and manage file ingestion for data pipelines."
* Snowflake Study Guide - Data Loading and Unloading:Lists directory tables as a feature that helps manage file ingestion, tracking, and metadata joins for both structured and unstructured data processing.