SnowPro Core Certification — Question 628
Which query contains a Snowflake hosted file URL in a directory table for a stage named bronzestage?
Answer options
- A. list @bronzestage;
- B. select * from directory(@bronzestage);
- C. select metadata$filename from @bronzestage;
- D. select * from table(information_schema.stage_directory_file_registration_history( stage_name=>'bronzestage'));
Correct answer: B
Explanation
The correct answer is B because the 'select * from directory(@bronzestage);' command explicitly retrieves the contents of the directory associated with the bronzestage, including file URLs. Option A only lists the items in the stage without providing detailed information, while C attempts to fetch file names directly from the stage, and D queries a registration history rather than the current directory contents.