SnowPro Associate: Platform Question 189
Single answer● StagesA data engineering team loads daily CSV files from an Amazon S3 bucket into Snowflake. They want Snowflake to read the files directly from S3 without first uploading them with PUT, and they want to avoid embedding cloud credentials in every data load command. Which Snowflake stage configuration best meets these requirements?
- A
Create a named internal stage and use PUT to copy files from S3 into Snowflake before running COPY INTO.
- B
Create a named external stage that references the S3 bucket and associates it with a storage integration, then use COPY INTO from that stage.
- C
Create a temporary table stage and configure it with the S3 bucket URL so Snowflake can read the files during the session.
- D
Create a user stage and grant the S3 IAM role directly to the Snowflake virtual warehouse.
Show answer and explanation
Correct answer: B
Explanation
The best answer is to use a named external stage backed by Amazon S3 and secured with a storage integration. Snowflake stages are either internal or external. Internal stages, including user stages, table stages, and named internal stages, store files in Snowflake-managed storage. External stages reference files that remain in cloud storage such as Amazon S3. In this scenario, the team wants Snowflake to read files directly from S3 and avoid embedding credentials in commands, so a named external stage with a storage integration is the most appropriate design. This aligns with Snowflake best practices for secure access management and reusable ingestion patterns. Relevant Snowflake documentation covers external stages, storage integrations, and loading data from S3 with COPY INTO.
- A. Incorrect.
Incorrect. A named internal stage stores files inside Snowflake and requires loading files into Snowflake-managed storage, typically with PUT from a local file system. Since the requirement is to read files directly from S3 and avoid first uploading them into Snowflake, an internal stage does not best meet the scenario.
- B. Correct.
Correct. A named external stage can point directly to files in Amazon S3. Associating the stage with a storage integration is the recommended approach because it avoids placing cloud credentials directly in COPY commands or stage definitions. This is a common best practice for secure, reusable access to external cloud storage.
- C. Incorrect.
Incorrect. Table stages are internal Snowflake stages automatically associated with a table. They cannot be configured to reference an external S3 bucket. This option confuses internal stage types with external stages.
- D. Incorrect.
Incorrect. User stages are internal stages tied to individual Snowflake users. Virtual warehouses do not assume S3 IAM roles directly for stage access. Access to S3 for external stages is configured through stage credentials or, preferably, a storage integration.