Correct Answer: B
The correct answer is B. ALTER STAGE .
Directory tables are associated with stages. To manually refresh the metadata in a directory table, the stage is refreshed using the ALTER STAGE ... REFRESH command.
Why B is correct:
A directory table stores file-level metadata for files in a stage. Since the directory table is tied to the stage, the manual refresh operation is performed through the stage.
Example:
ALTER STAGE my_stage REFRESH;
This refreshes the directory table metadata for the stage.
Why the other options are incorrect:
A). TRUNCATE STAGE is not the command used to refresh directory table metadata.
C). ALTER TABLE is used to modify table properties, not refresh a directory table associated with a stage.
D). ALTER VIEW is used to modify views, not directory tables.
Official Snowflake documentation reference:
Snowflake documentation explains that directory table metadata can be refreshed manually using ALTER STAGE ... REFRESH.
Reference: Snowflake Documentation - Directory tables; Snowflake Documentation - ALTER STAGE; SnowPro Core Study Guide - Data Loading and Unloading.
==