[Bug] Materialized views cannot be authorized #773
Labels
feature:materialized-views
Issues related to materialized views
pkg:dbt-bigquery
Issue affects dbt-bigquery
type:bug
Something isn't working as documented
Is this a new bug in dbt-bigquery?
Current Behavior
Similarly to BigQuery views, BigQuery materialized views can also be authorized to access the data in another dataset(s). However, providing the
grant_access_to
configuration to a model withmaterialized_view
materialization goes silently ignored and the materialized view does NOT get authorized to access data in another dataset. With models withview
materialization, thegrant_access_to
configuration leads to the desired behavior, namely the view gets authorized to access data in another dataset.Expected Behavior
As per the dbt official documentation, the
grant_access_to
config can be used to "grant the view model access to select from the list of datasets provided". Similarly, one would expect dbt models with materialization set tomaterialized_view
take thegrant_access_to
config and be authorized to access data in another dataset.Steps To Reproduce
dbt_project.yml
contents I used:test_model.sql
contents:test_materialized_view.sql
contents:test_view.sql
contents:dbt run
.test_view
becomes an authorized view, whiletest_materialized_view
gets ignored and does not get authorized to access data in dataset{ANOTHER_PROJECT_ID}.test_dataset
.Relevant log output
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: