
Explanation:
The correct syntax to query a directory table in Snowflake is SELECT * FROM DIRECTORY(@mystage). This is explicitly documented in Snowflake's official documentation for querying directory tables. Option B follows this exact syntax pattern. Option A uses incorrect syntax with ::DIRECTORY, Option C uses non-existent TO_TABLE function, and Option D has incorrect parameter placement with DIRECTORY after the stage name. The community discussion shows 100% consensus on B with multiple references to Snowflake documentation confirming this is the proper syntax.
Ultimate access to all questions.
No comments yet.
How can a Snowflake user query a directory table that was created for the stage named mystage?
A
SELECT * FROM @mystage::DIRECTORY
B
SELECT * FROM DIRECTORY (@mystage)
C
SELECT * FROM TO_TABLE (DIRECTORY @mystage)
D
SELECT * FROM TABLE (@mystage DIRECTORY)