-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dbt-core 1.2 upgrade: Grants #42
Labels
Comments
Version Requirement: This functionality only available to instances using Dremio v22.0+ Enterprise Edition. References: |
This was
linked to
pull requests
Nov 9, 2022
ravjotbrar
added a commit
that referenced
this issue
Nov 9, 2022
### Summary This PR makes the necessary changes to support grants in our adapter. All tests provided by dbt-core pass (with modifications). For grants to work, changes need to be made to the relevant "grant" macros. Also made a few miscellaneous changes including updating smoke_tests to not wipe out current profiles.yml file. ### Description #### Macros - **support_multiple_grantees_per_dcl_statement**: Dremio only supports one grantee per statement - **get_show_grant_sql**: Gets data from privileges table - **get_grant_sql** : Contains sql for granting a privilege - **get_revoke_sql**: Contains sql for revoking a privilege - **call_dcl_statements**: Dremio only supports calling one statement at a time These macros are all called by the default apply_grants macro provided by dbt-core. For this reason, we need to make sure apply_grants is called in each of the materializations (table, view, seed, incremental). #### Tests - **test_model_grants**: Tests grants for views and tables - **test_incremental_grants**: Tests grants for incremental materializations - **test_seed_grants**: Tests grants for seeds - **test_snapshot_grants**: Tests grants for snapshots - **test_invalid_grants**: Tests invalid grants by providing a invalid privilege and invalid user #### Miscellaneous - Added logic to keep current profiles.yml file in smoke_tests - Removed the schema.sql macro, as those methods are overridden in impl.py - Added logic to drop a table when drop_schema is called (only spaces allow the entire schema to be deleted) - Added copyright headers to basic func tests ### Related Issue #42 ### Additional Reviewers @ArgusLi @jlarue26
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From dbt-labs/dbt-core#5468:
See link for list of Override-able macros and methods.
The text was updated successfully, but these errors were encountered: