CREATE OR REPLACE VIEW removes permissions [Unity Catalog]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2023 07:06 AM
When I run CREATE OR REPLACE VIEW on an existing view in Unity Catalog, the grants that were made on that object are removed. This seems like it is a bug. Is it on purpose or not?
How to replicate:
1. Create the view
Run the create or replace statement:
create or replace view bronze.default.test_access_view
as
select 1 as one;
2. Grant access to a user
Run a statement to grant access
grant select on bronze.default.test_access_view to `user1`
3. Verify that user has access to view
4. Rerun the create or replace view statement
create or replace view bronze.default.test_access_view
as
select 1 as one;
5. Check permissions
User1 does not have permission on the table anymore.The reason I suspect this is a bug is because if I run CREATE OR REPLACE TABLE instead of view, and follow the same exact procedures as above, then user1 does not lose access to the table afterwards.Is this a bug that can be fixed?
- Labels:
-
Unity Catalog