COF-C02 · Question #297
Which query contains a Snowflake hosted file URL in a directory table for a stage named bronzestage?
The correct answer is B. select * from directory(@bronzestage). The DIRECTORY() table function queries the directory table associated with a named stage and returns metadata about staged files, including the Snowflake-hosted file URL (a pre-signed URL in the FILE_URL column). This URL allows access to the file through Snowflake's…
Question
Which query contains a Snowflake hosted file URL in a directory table for a stage named bronzestage?
Options
- Alist @bronzestage;
- Bselect * from directory(@bronzestage);
- Cselect metadata$filename from @bronzestage;
- Dselect * from table(information_schema.stage_directory_file_registration_history( stage
How the community answered
(23 responses)- A9% (2)
- B87% (20)
- D4% (1)
Explanation
The DIRECTORY() table function queries the directory table associated with a named stage and returns metadata about staged files, including the Snowflake-hosted file URL (a pre-signed URL in the FILE_URL column). This URL allows access to the file through Snowflake's infrastructure. The LIST command (A) shows file paths but not hosted URLs. Querying metadata$filename (C) returns relative paths within the stage. The information_schema function (D) returns file registration history, not current directory contents with hosted URLs.
Topics
Community Discussion
No community discussion yet for this question.