Skip to content
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

[Bug] Execute post_hook after apply_grants and persist_docs #1440

Open
2 tasks done
wilsonkkyip opened this issue Dec 27, 2024 · 0 comments
Open
2 tasks done

[Bug] Execute post_hook after apply_grants and persist_docs #1440

wilsonkkyip opened this issue Dec 27, 2024 · 0 comments
Labels
bug Something isn't working triage

Comments

@wilsonkkyip
Copy link

Is this a new bug in dbt-bigquery?

  • I believe this is a new bug in dbt-bigquery
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

post_hook is executed before apply_grants and persist_docs

Expected Behavior

post_hook being executed after apply_grants and persist_docs

Steps To Reproduce

Reading the script in https://github.com/dbt-labs/dbt-bigquery/tree/main/dbt/include/bigquery/macros/materializations

Relevant log output

No response

Environment

- OS: Mac OS 15.1 (24B2083)
- Python: 3.11.11
- dbt-core: 1.9.1
- dbt-bigquery: 1.8.3

Additional Context

I have written a few post hooks to compare between the table metadata from BigQuery API (through adapter) and the model properties from the yaml files.

If apply_grants and persist_docs are being run after post_hook, the column description and policy tags will never match the specification in the yaml files.

Of course I can create a custom materialization for my usage. But I am thinking if it will be better to run post_hook after apply_grants and persist_docs in general?

@wilsonkkyip wilsonkkyip added bug Something isn't working triage labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

No branches or pull requests

1 participant