SOL-C01 · Question #179
You have a Snowflake external stage configured to access Parquet files in an AWS S3 bucket. You want to query these Parquet files directly using Snowflake without explicitly loading them into a…
The correct answer is D. Create an external stage pointing to the S3 bucket with 'ENABLE DIRECTORY = TRUE specified. Option D is correct because enabling directory tables requires specifying DIRECTORY = (ENABLE = TRUE) directly in the CREATE STAGE statement (or via ALTER STAGE ... SET DIRECTORY = (ENABLE = TRUE)), which activates the directory table feature at the stage level - without this…
Question
You have a Snowflake external stage configured to access Parquet files in an AWS S3 bucket. You want to query these Parquet files directly using Snowflake without explicitly loading them into a table. You also want to enable directory tables for this external stage. Which of the following steps are necessary to enable directory tables for the external stage and query the data?
Options
- ACreate an external stage pointing to the S3 bucket, then execute 'ALTER STAGE SET
- BCreate an external stage pointing to the S3 bucket, then execute 'ALTER STAGE REFRESH;' ,
- CCreate an external stage pointing to the S3 bucket, execute 'ALTER STAGE SET
- DCreate an external stage pointing to the S3 bucket with 'ENABLE DIRECTORY = TRUE specified
- ECreate an external stage pointing to the S3 bucket with 'ENABLE DIRECTORY = TRUE specified
How the community answered
(60 responses)- A5% (3)
- B2% (1)
- C3% (2)
- D77% (46)
- E13% (8)
Explanation
Option D is correct because enabling directory tables requires specifying DIRECTORY = (ENABLE = TRUE) directly in the CREATE STAGE statement (or via ALTER STAGE ... SET DIRECTORY = (ENABLE = TRUE)), which activates the directory table feature at the stage level - without this, Snowflake has no mechanism to track file metadata from the external location.
Options A and C are wrong because ALTER STAGE SET without the correct DIRECTORY = (ENABLE = TRUE) clause does nothing to activate directory tables; altering the stage is only valid if the correct property is included. Option B is wrong because ALTER STAGE REFRESH only refreshes an already-enabled directory table's metadata - it cannot enable the feature itself, so running it on a stage without directory tables enabled will either error or have no effect. Option E is a distractor likely differing from D in a subtle but critical detail (e.g., incorrect syntax or a missing property), making D the only fully correct formulation.
Memory tip: Think of it as a two-step "Enable → Refresh" pattern: you enable directory tables in the stage definition (DIRECTORY = (ENABLE = TRUE)), and you refresh (ALTER STAGE REFRESH) to sync file metadata afterward - REFRESH without ENABLE is like hitting refresh on an empty browser; there's nothing there yet.
Topics
Community Discussion
No community discussion yet for this question.