COF-C02 · Question #556
To use the overwrite option on insert, which privilege must be granted to the role?
The correct answer is B. DELETE. To use the overwrite option on insert in Snowflake, the DELETE privilege must be granted to the role. This is because overwriting data during an insert operation implicitly involves deleting the existing data before inserting the new data. Understanding the Overwrite Option…
Question
To use the overwrite option on insert, which privilege must be granted to the role?
Options
- Atruncate
- BDELETE
- CUPDATE
- DSELECT
How the community answered
(14 responses)- B93% (13)
- C7% (1)
Explanation
To use the overwrite option on insert in Snowflake, the DELETE privilege must be granted to the role. This is because overwriting data during an insert operation implicitly involves deleting the existing data before inserting the new data. Understanding the Overwrite Option: The overwrite option (INSERT OVERWRITE) allows you to replace existing data in a table with new data. This operation is particularly useful for batch- loading scenarios where the entire dataset needs to be refreshed. Why DELETE Privilege is Required: Since the overwrite operation involves removing existing rows in the table, the executing role must have the DELETE privilege to carry out both the deletion of old data and the insertion of new data. Granting DELETE Privilege: To grant the DELETE privilege to a role, an account administrator can execute the following SQL GRANT DELETE ON TABLE my_table TO ROLE my_role;
Topics
Community Discussion
No community discussion yet for this question.