deutschZuid
deutschZuid

Reputation: 1058

Is there a way to give ownership of new tables to the schema owner automatically?

When a user creates a new table in Snowflake using a user role, is it possible to automatically transfer the ownership of the new table to the owner role of the schema rather than to the user role that creates it?

Upvotes: 1

Views: 809

Answers (1)

Srinath Menon
Srinath Menon

Reputation: 1642

Yes, you can set the OWNERSHIP privileges to all FUTURE tables that will be created to a specific user.

Command for this would be as follows:

grant ownership on future tables in schema <name of the schema> to role <owner role of the schema>;

Upvotes: 2

Related Questions