COF-C03 Question 215
Single answerInternal stagesA data engineering team loads daily CSV files into a table named SALES_RAW by first uploading the files to an internal stage. The team wants to simplify the process so that analysts can upload files directly to a stage associated with SALES_RAW and then run COPY INTO SALES_RAW without specifying a stage name each time. Which action should the engineer take to support this workflow?
- A
Create a named internal stage and configure it as the default stage for SALES_RAW
- B
Use the table stage for SALES_RAW and reference it as @%SALES_RAW when uploading and loading files
- C
Use the user stage for each analyst and reference it as @~ so COPY INTO SALES_RAW automatically reads from that user stage
- D
Create an external stage that points to Snowflake-managed storage and attach it to SALES_RAW
Show answer and explanation
Correct answer: B
Explanation
The correct choice is to use the table stage, which is an internal stage automatically available for each table. In Snowflake, there are three internal stage types: user stages, table stages, and named internal stages. A table stage is designed for files intended to be loaded into a specific table and is referenced as @%<table_name>. This is the most direct way to support a workflow where users upload files to a table-associated stage and then load them into that table. Named internal stages are reusable and useful for shared pipelines, but they are not implicitly bound to a table. User stages are private to individual users and are less suitable for a shared team ingestion pattern. This aligns with Snowflake documentation on staging data and internal stage types, including the syntax for table stages and COPY INTO operations.
- A. Incorrect.
Incorrect. A named internal stage can be created and used for loading, but Snowflake does not support configuring a named stage as the default stage for a table. To avoid specifying a stage name and to associate files directly with a table, the built-in table stage should be used instead.
- B. Correct.
Correct. Every table in Snowflake has an implicit table stage that can be referenced with @%table_name, such as @%SALES_RAW. Files can be uploaded there with PUT and then loaded with COPY INTO SALES_RAW FROM @%SALES_RAW. This is the internal stage specifically associated with the table and matches the requirement to simplify loading into that table.
- C. Incorrect.
Incorrect. A user stage (@~) is associated with a user, not a table. While analysts can upload files to their own user stages, COPY INTO SALES_RAW would still need to reference that user stage explicitly, and it would not provide a shared table-associated staging location for the team.
- D. Incorrect.
Incorrect. External stages point to cloud storage such as Amazon S3, Google Cloud Storage, or Azure Blob Storage/Data Lake, not Snowflake-managed internal storage. They also are not attached to a table as an implicit default stage. This option confuses internal and external stage concepts.