dbt-labs / dbt-labs/docs.getdbt.com
Explain when `schemas` and `database_schemas` would be empty within an `on-run-end` hook
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 1.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 130
Description
### Contributions
- [x] I have read the contribution docs, and understand what's expected of me.
### Link to the page on docs.getdbt.com requiring updates
https://docs.getdbt.com/reference/dbt-jinja-functions/on-run-end-context#schemas
### What part(s) of the page would you like to see updated?
Add some additional information explaining when the [`schemas`](https://docs.getdbt.com/reference/dbt-jinja-functions/on-run-end-context#schemas) or [`database_schemas`](https://docs.getdbt.com/reference/dbt-jinja-functions/on-run-end-context#database_schemas) would be empty within an `on-run-end` hook.
These are some _assumptions_ that would need to be fact-checked before adding them to the documentation:
- in the case of `dbt compile`, these context variables are empty because dbt hasn't built anything yet [[1](https://github.com/dbt-labs/dbt-core/issues/9301#issuecomment-1921581199)]
- if a `dbt run` (or `build`, `seed`, `snapshot`, etc.) doesn't succeed, then these context variables will be empty [[2](https://github.com/dbt-labs/dbt-core/issues/9301#issuecomment-2364325536)]
### Additional information
See https://github.com/dbt-labs/dbt-core/issues/9301 for background context.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.