ADA-C01 Question 335
Single answerMetadata cacheA data engineering team loads Parquet files from an S3 data lake into a Snowflake external table every 15 minutes. Analysts report that newly added files are not appearing in query results from the external table for several minutes, even though the files are already present in S3 and the stage points to the correct location. The administrator wants the new files to be discoverable as quickly as possible without recreating the external table. Which action should the administrator take?
- A
Run ALTER EXTERNAL TABLE <table_name> REFRESH to update Snowflake's metadata for the external table
- B
Suspend and resume the virtual warehouse that queries the external table to clear the metadata cache
- C
Run ALTER STAGE <stage_name> REFRESH so the external table automatically detects the new files immediately
- D
Disable result caching for the session so queries re-read the external table file list from cloud storage
Show answer and explanation
Correct answer: A
Explanation
The key issue is Snowflake metadata freshness for the external table, not compute caching or query result reuse. External tables use metadata about files stored in cloud storage, and that metadata must be refreshed before newly added files become visible to queries. In practice, administrators use ALTER EXTERNAL TABLE ... REFRESH, or configure auto-refresh where supported, to reduce discovery latency. Warehouse lifecycle operations and disabling the result cache do not refresh external table metadata. This aligns with Snowflake documentation on external tables and metadata refresh behavior, which distinguishes external table metadata from query result caching and warehouse execution state.
- A. Correct.
Correct. External tables rely on Snowflake-maintained metadata about the files in the referenced stage location. When new files are added, Snowflake does not necessarily expose them to the external table until its metadata is refreshed. Running ALTER EXTERNAL TABLE ... REFRESH updates the file metadata used by the external table so newly added files can be queried without recreating the object.
- B. Incorrect.
Incorrect. Suspending or resuming a warehouse affects compute availability, not the metadata maintained for an external table. External table file discovery is not controlled by warehouse state, so this does not address stale metadata about newly added files.
- C. Incorrect.
Incorrect. ALTER STAGE ... REFRESH is associated with directory tables for stages, not with refreshing external table metadata itself. A common misconception is that stage refresh operations automatically propagate to external tables, but external tables require their own metadata refresh process unless auto-refresh is configured and supported.
- D. Incorrect.
Incorrect. Disabling result cache can force query re-execution, but it does not update the external table's underlying file metadata. If Snowflake has not refreshed the external table metadata, rerunning the query still will not include newly discovered files.