SnowPro Associate: Platform Question 231
Single answer○ LISTA data engineer is troubleshooting why a nightly load from an Amazon S3 bucket is missing several expected files. The files are supposed to be read through an existing external stage named ext_sales_stage. Before changing the COPY INTO command, the engineer wants to verify which files Snowflake can currently see through that stage and whether a specific folder path contains the expected CSV files. Which statement should the engineer use?
- A
LIST @ext_sales_stage/pending/ PATTERN='.*\.csv';
- B
SHOW FILES IN STAGE ext_sales_stage LIKE '*.csv' IN PATH 'pending/';
- C
DESCRIBE STAGE ext_sales_stage FILES='pending/*.csv';
- D
GET @ext_sales_stage/pending file:///tmp/ PATTERN='.*\.csv';
Show answer and explanation
Correct answer: A
Explanation
LIST is the Snowflake command used to inspect files available in a stage. It works with both internal and external stages and can be scoped to a path under the stage, such as @stage_name/folder/. It also supports PATTERN filtering using a regular expression, which is useful when validating which files are available for a COPY INTO operation. In practical troubleshooting, LIST helps confirm whether Snowflake can see the expected objects in cloud storage before investigating file format, permissions, or COPY logic. By contrast, DESCRIBE STAGE shows stage definition details, and GET is for downloading files from internal stages. Snowflake documentation for staged data operations identifies LIST as the command for listing staged files.
- A. Correct.
Correct. The LIST command is used to return the files Snowflake can see in a stage, including internal and external stages. It can target a stage path such as @ext_sales_stage/pending/ and optionally filter results with a regular-expression PATTERN. This is the appropriate command to inspect whether expected CSV files are visible before loading them.
- B. Incorrect.
Incorrect. SHOW commands can display metadata about objects such as stages, tables, and pipes, but there is no valid SHOW FILES IN STAGE syntax for listing stage contents in this way. A common misconception is to assume SHOW can enumerate staged files, but Snowflake uses LIST for that purpose.
- C. Incorrect.
Incorrect. DESCRIBE STAGE returns properties and configuration details of the stage object, such as URL, storage integration, and file format settings. It does not enumerate the files available within the stage path. Someone might choose this option because they want more information about the stage, but it will not answer which files are present.
- D. Incorrect.
Incorrect. GET is used to download files from an internal stage to a local file system. It does not list files in an external stage for inspection, and it is not the correct troubleshooting command in this scenario. This distractor reflects confusion between file transfer commands and stage inspection commands.