COF-C03 exam dumps

COF-C03 practice question 221 of 350

SnowPro® Core Certification (COF-C03). Associate level, Snowflake. Free question with the correct answer and a full explanation.

COF-C03 Question 221

Single answerDirectory tables

A data engineering team stores daily partner-delivered files in an external stage backed by cloud object storage. They created a directory table on the stage so downstream processes can query the list of available files and their metadata from SQL. After a partner uploads several new files directly to the cloud storage location, the team's query against the directory table does not show the new files. They need the directory table metadata to reflect the newly added files. Which action should the engineer take?

  1. A

    Execute ALTER STAGE <stage_name> REFRESH to refresh the stage metadata so the directory table can reflect the new files.

  2. B

    Run RECLUSTER on the directory table to force Snowflake to rescan the external stage and load new file entries.

  3. C

    Execute ALTER EXTERNAL TABLE <table_name> REFRESH because directory tables inherit file listings from external tables on the same stage.

  4. D

    Use UPDATE on the directory table to insert rows for the missing files and then COMMIT the transaction.

Show answer and explanation

Correct answer: A

Explanation

Directory tables provide a queryable inventory of files in a stage, including metadata such as file names and paths. When new files are added directly to the underlying cloud storage for an external stage, Snowflake must refresh the stage metadata before the directory table reflects those files, unless automated refresh is configured and available for that integration pattern. The practical administrative action is ALTER STAGE ... REFRESH. This aligns with Snowflake documentation on directory tables and stage metadata refresh behavior. The key exam concept is understanding that directory tables are not user-managed tables and are distinct from external tables; they depend on stage refresh mechanisms to stay current.

  • A. Correct.

    Correct. For stages with directory tables, Snowflake uses stage metadata to represent files available in the stage. When files are added directly in cloud storage, Snowflake does not automatically know about them unless auto-refresh is configured and supported, or the stage metadata is refreshed manually. Executing ALTER STAGE ... REFRESH updates the stage's file metadata, which in turn allows queries against the directory table to include the new files.

  • B. Incorrect.

    Incorrect. RECLUSTER applies to clustered tables and micro-partition organization, not to directory tables or stage file discovery. A directory table is metadata about staged files, not a table whose storage layout can be reclustered.

  • C. Incorrect.

    Incorrect. External tables and directory tables are separate features, even though both can reference staged data. Refreshing an external table updates partition metadata for that external table, but it does not refresh a stage's directory table metadata. This option reflects a common misconception that all stage-based metadata objects are refreshed together.

  • D. Incorrect.

    Incorrect. A directory table is system-maintained metadata associated with a stage. Users do not manually insert or update rows in it. Attempting to treat it like a regular table is incorrect because the metadata must come from Snowflake's refresh process against the stage.

Timed practice exam

Take a COF-C03 practice test under exam conditions

100 questions in 115 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam