databricks / dbt-databricks

A dbt adapter for Databricks.
https://databricks.com
Apache License 2.0
212 stars 113 forks source link

Support for the `USE_SCHEMA` grant type using the `+grants` model config #294

Open nihil0 opened 1 year ago

nihil0 commented 1 year ago

Describe the feature

Databricks Unity Catalog requires that the USE_SCHEMA grant be applied to the parent schema without which grants applied to a model have no effect. Currently dbt does not support the USE_SCHEMA grant type in the +grants: model config. I would like to be able to change the behaviour of +grants such that it automatically applies USE_SCHEMA to the parent schema of that model.

Describe alternatives you've considered

We currently use a macro that applies USE_SCHEMA to all the schemas created as part of the dbt run using a post hook. This is a bit inelegant.

Who will this benefit?

This would benefit everyone working with Databricks unity catalog who is handling grants using dbt.

Are you interested in contributing this feature?

I would like to implement this feature, but I don't know where to get started. Is this something that should be a part of this repo? Or dbt-spark?

github-actions[bot] commented 1 year ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.

benc-db commented 1 year ago

Marking this as a bug, since it sounds like the grants functionality doesn't work as expected in UC without USE SCHEMA

github-actions[bot] commented 6 months ago

This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue.