SOL-C01 · Question #14
You have a Snowflake environment with a database named 'ANALYTICS DB'. You need to load data into a table named 'CUSTOMER DATA' that resides in a schema called 'RAW DATA" within 'ANALYTICS DB'. The da
The correct answer is A. The `RAW DATA' schema does not exist within the 'ANALYTICS DB' database. B. The role executing the 'COPY INTO' command lacks the SUSAGE' privilege on the 'RAW DATA'. Snowflake COPY INTO - Error Diagnosis Options A and B are correct because they represent two fundamental prerequisites that must be satisfied before any data can land in a table: A - If the schema RAW DATA doesn't exist as a Snowflake schema object in ANALYTICS DB, the fully-qual
Question
You have a Snowflake environment with a database named 'ANALYTICS DB'. You need to load data into a table named 'CUSTOMER DATA' that resides in a schema called 'RAW DATA" within 'ANALYTICS DB'. The data is staged in an internal stage called '@RAW DATA STAGE'. You encounter an error during the 'COPY INTO' command. Identify TWO potential reasons that could be causing this error, assuming the stage exists, the file format is correctly specified, and the data file is present.
Options
- AThe `RAW DATA' schema does not exist within the 'ANALYTICS DB' database.
- BThe role executing the 'COPY INTO' command lacks the SUSAGE' privilege on the 'RAW DATA'
- CThe table has a defined primary key, but the data in the staged file contains duplicate key values.
- DThe user executing the `COPY INTO' command does not have the 'OWNERSHIP' privilege on the
- EThe warehouse associated with the current session has not been resumed, so resources aren't
How the community answered
(57 responses)- A67% (38)
- C9% (5)
- D19% (11)
- E5% (3)
Explanation
Snowflake COPY INTO - Error Diagnosis
Options A and B are correct because they represent two fundamental prerequisites that must be satisfied before any data can land in a table:
A - If the schema RAW DATA doesn't exist as a Snowflake schema object in ANALYTICS DB, the fully-qualified table reference (ANALYTICS_DB.RAW_DATA.CUSTOMER_DATA) resolves to nothing, causing an immediate object-not-found error regardless of whether the stage is valid.
B - Snowflake uses a hierarchical privilege model: even if a role has INSERT on the table, it still needs USAGE on the schema to traverse the namespace and reach that table. Missing schema-level USAGE silently blocks access to everything inside it.
Why the distractors are wrong:
- C - Snowflake does not enforce primary key constraints. They are purely informational metadata; duplicate key values in staged files are loaded without error.
- D -
OWNERSHIPis far more than needed.INSERT(plus schema/databaseUSAGE) is sufficient forCOPY INTO. Requiring ownership would be an unusual and overly restrictive design. - E - Warehouses auto-resume by default when a statement is submitted. A suspended warehouse would start, not block the command.
Memory tip: Think "Exist → Access → Insert" - the schema must exist, your role must have USAGE to traverse it, and then INSERT to write. Skipping either of the first two steps is the most common COPY INTO gotcha.
Topics
Community Discussion
No community discussion yet for this question.