正解:B
The correct answer is B. Directory table .
A directory table stores file-level metadata for files in a Snowflake stage. It can be used to see a list of files available in an internal or external stage.
Why B is correct:
Directory tables allow users to query staged file metadata, including file path, file size, last modified timestamp, and file URL information.
Example:
SELECT *
FROM DIRECTORY(@my_stage);
This returns metadata for files stored in the stage.
Why the other options are incorrect:
A). A semantic view is used to define business-friendly semantic relationships for analytics, not to list staged files.
C). A materialized view stores precomputed query results, not stage file metadata.
D). Information Schema contains metadata about Snowflake objects, but the Snowflake object specifically designed to list files in a stage is a directory table.
Official Snowflake documentation reference:
Snowflake documentation describes directory tables as objects that store a catalog of staged files in cloud storage.
Reference: Snowflake Documentation - Directory tables; Snowflake Documentation - Stages; SnowPro Core Study Guide - Data Loading and Unloading.
==