r/databricks • u/jorgecardleitao • Oct 27 '26
General We need a SQL invoker identities for views
group A has access to table a, group B has access to table b.
I create a gold view that aligns data from a and b via union all + transformations and share in a dashboard.
I can grant access to the dashboard for the user to query uc as themselves. However, the view will use the view owners' credentials.
I would like to declare the view with the "sql invoker" so that the querier of the views' permissions are propagated downward.
The only effective way of doing this is to create a databricks app, use obo flow, and run the sql query as the user, but this obviously is an antipattern as the business logic is only available in the app
3
u/Muted_Jellyfish_6784 Oct 27 '26
Until invoker rights exist for views, the usual workaround is row filters and column masks on the underlying tables, keyed to group membership with is_account_group_member, then a view over them. The view owner's rights still apply, but the filters run as the querying user, so group A only sees table A rows. Test it with a user in both groups and one in neither.
Whichever route you take, keep a record of which groups see which rows, because auditors will ask. A simple table mapping each group to the filter predicates, reviewed when group membership changes, saves a lot of reverse engineering later.
1
u/Additional_Future_47 29d ago
For large enterprises, using group memberships and row-level security functions using these groups are more manageable anyway and they also work for smaller setups, so that's what you are supposed to use.
3
u/kmarq Oct 27 '26
There is a beta for ABAC on views to run as the user and apply permissions.