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

[Feature] Execute post_hook after apply_grants and persist_docs #11189

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

[Feature] Execute post_hook after apply_grants and persist_docs #11189

wilsonkkyip opened this issue Dec 27, 2024 · 0 comments
Labels
enhancement New feature or request

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
@amychen1776 amychen1776 added enhancement New feature or request and removed bug Something isn't working labels Jan 6, 2025
@amychen1776 amychen1776 changed the title [Bug] Execute post_hook after apply_grants and persist_docs [Feature] Execute post_hook after apply_grants and persist_docs Jan 6, 2025
@amychen1776 amychen1776 removed the triage label Jan 6, 2025
@amychen1776 amychen1776 transferred this issue from dbt-labs/dbt-bigquery Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants