You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test that projects can define grants in 1) the dbt_project.yml, 2) models, seeds, and snapshots, and 3) both the dbt_project.yml and models, seeds, and snapshots and those permissions can be read back directly from the postgres warehouse after a run.
test two subsequent runs (dbt build && dbt build) with: same grants; additional grants in second run; fewer grants in second run. Confirm that the final set of grants matches the final configured set of grants in all cases.
Special case: grants: {'select': []} in second run. Should revoke all grants, and add none back.
For models: tests for view, table, and incremental materializations
For incremental: subsequent runs with and without --full-refresh
Read back logs and count number of show/grant/revoke statements, to validate that dbt is taking the most efficient possible route — this is half done, would require more logic to handle per-adapter behavior
Test cases for known failure conditions:
granting to a user/role/group that doesn't exist
granting a privilege type that doesn't exist
Multiple grantees
Multiple privileges
Adapter specific
These tests will need to be defined in each individual adapter plugin, as new tests or extensions of existing "adapter zone" ones
Snowflake
Test interaction with copy_grants for view, table, incremental (--full-refresh), seed (--full-refresh)
github-actionsbot
changed the title
add tests to the "adapter zone" so that adapters can inherit and run them. Everything should be tested on all 3 model materializations (view + table + incremental) + seeds + snapshots
[CT-808] add tests to the "adapter zone" so that adapters can inherit and run them. Everything should be tested on all 3 model materializations (view + table + incremental) + seeds + snapshots
Jul 5, 2022
jtcohen6
changed the title
[CT-808] add tests to the "adapter zone" so that adapters can inherit and run them. Everything should be tested on all 3 model materializations (view + table + incremental) + seeds + snapshots
[CT-808] Add "adapter zone" tests for grants
Jul 7, 2022
grants: {'select': []}
in second run. Should revoke all grants, and add none back.--full-refresh
show
/grant
/revoke
statements, to validate that dbt is taking the most efficient possible route — this is half done, would require more logic to handle per-adapter behaviorAdapter specific
These tests will need to be defined in each individual adapter plugin, as new tests or extensions of existing "adapter zone" ones
Snowflake
copy_grants
for view, table, incremental (--full-refresh
), seed (--full-refresh
)BigQuery
Test anticipated failure when— see Alt approach for grant location dbt-bigquery#218location
is not definedSpark
grant
SQL statement)The text was updated successfully, but these errors were encountered: