nerdexam
Snowflake

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…

Data Loading and Unloading

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)
  • A
    9% (2)
  • B
    87% (20)
  • D
    4% (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

#Snowflake Stages#Directory Tables#File Management#Data Loading

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice