What is the recommended way to obtain a cloned table with the same grants as the source table?
What is the recommended way to obtain a cloned table with the same grants as the source table?
The recommended way to obtain a cloned table with the same grants as the source table is to clone the table with the COPY GRANTS command. This command ensures that all privileges, except for OWNERSHIP, are copied from the source table to the new table.
A https://docs.snowflake.com/en/user-guide/object-clone#:~:text=When%20the%20COPY%20GRANTS%20parameter%20is%20specified%20in%20a%20CREATE%20TABLE%20statement%2C%20the%20create%20operation%20copies%20all%20privileges%2C%20except%20OWNERSHIP%2C%20from%20the%20source%20table%20to%20the%20new%20table.
CREATE <object> … CLONE statements for most objects do not copy grants on the source object to the object clone. However, CREATE <object> commands that support the COPY GRANTS clause (e.g. CREATE TABLE, CREATE VIEW) enable you to optionally copy grants to object clones. For example, the CREATE TABLE … CLONE command syntax supports the COPY GRANTS parameter. When the COPY GRANTS parameter is specified in a CREATE TABLE statement, the create operation copies all privileges, except OWNERSHIP, from the source table to the new table. The same behavior is true for other CREATE commands that support the COPY GRANTS clause.
A. Clone the table with the COPY GRANTS command
correct