Reported Issue
Error while expanding view. User does not have access to <view_name>
Relevant Versions
All Dremio Versions
Troubleshooting Steps
1. Check that the user does have the required usage and select privileges on the object
If the user does not have the correct privileges, Grant the privileges required. This can be done via the UI or via a 'GRANT' SQL command
2. Check the owner of the object. If the owner is $unknown$, or says "This user/role was removed," change the ownership to a current user with the following command:
GRANT OWNERSHIP ON VIEW <view> to USER <user>
You can also transfer ownership via the Privileges tab in the Settings UI for the View.
Cause
Objects without an owner can behave in odd ways. When a user leaves, it's recommended to change the ownership of any objects that the user created to prevent issues in the future.
Additional Resources
Grant to user documentation for Dremio Cloud: https://docs.dremio.com/cloud/reference/sql/commands/grant-to-user
Grant documentation for Dremio Software:
https://docs.dremio.com/current/reference/sql/commands/rbac/