SOL-C01 · Question #36
You have a custom role named 'TRANSFORM ROLE that needs to load data into a table called 'ORDERS'. You want to ensure that this role can only load data into this specific table and has no other privil
The correct answer is E. GRANT INSERT ON TABLE SALES DB.PUBLIC.ORDERS TO ROLE TRANSFORM ROLE;. Option E is correct because COPY INTO in Snowflake only requires INSERT privilege on the target table - nothing more - and option E grants exactly that to the correctly named role TRANSFORM ROLE. Why the distractors fail: A adds SELECT, which is unnecessary for a write-only load
Question
You have a custom role named 'TRANSFORM ROLE that needs to load data into a table called 'ORDERS'. You want to ensure that this role can only load data into this specific table and has no other privileges. The table is located in database 'SALES DB' and schema 'PUBLIC'. Which of the following grants provides the LEAST PRIVILEGED access required for 'TRANSFORM ROLE' to perform the data load operation using COPY INTO command?
Options
- AGRANT INSERT, SELECT ON TABLE SALES DB.PUBLIC.ORDERS TO ROLE TRANSFORM
- BGRANT ALL PRIVILEGES ON TABLE SALES DB.PUBLIC.ORDERS TO ROLE TRANSFORM
- CGRANT INSERT ON TABLE SALES DB.PUBLIC.ORDERS TO ROLE TRANSFORM ROLE;
- DGRANT OWNERSHIP ON TABLE SALES DB.PUBLIC.ORDERS TO ROLE TRANSFORM ROLE;
- EGRANT INSERT ON TABLE SALES DB.PUBLIC.ORDERS TO ROLE TRANSFORM ROLE;
How the community answered
(39 responses)- A23% (9)
- B15% (6)
- C8% (3)
- D5% (2)
- E49% (19)
Explanation
Option E is correct because COPY INTO in Snowflake only requires INSERT privilege on the target table - nothing more - and option E grants exactly that to the correctly named role TRANSFORM ROLE.
Why the distractors fail:
- A adds
SELECT, which is unnecessary for a write-only load operation, violating the least-privilege principle. - B grants
ALL PRIVILEGES, which is the opposite of least privileged - it gives far more access than needed. - C looks identical at first glance, but targets a role named
TRANSFORM, notTRANSFORM ROLE- the wrong role entirely. - D grants
OWNERSHIP, which confers full control over the table including the ability to drop it or reassign privileges - massively over-privileged.
Memory tip: Think "COPY INTO = INSERT only." The command copies data in - it writes, never reads - so SELECT is never required. When you see a least-privilege question for data loading in Snowflake, the answer is always the option with INSERT alone, and always verify the role name matches exactly.
Topics
Community Discussion
No community discussion yet for this question.