Allow catalogs in any schema yml file#12616
Allow catalogs in any schema yml file#12616ankit-khare-2015 wants to merge 1 commit intodbt-labs:mainfrom
Conversation
|
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @ankit-khare-2015 |
|
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
5d9e5ac to
bf5400a
Compare
|
Thanks for your pull request, and welcome to our community! We require contributors to sign our Contributor License Agreement and we don't seem to have your signature on file. Check out this article for more information on why we have a CLA. In order for us to review and merge your code, please submit the Individual Contributor License Agreement form attached above above. If you have questions about the CLA, or if you believe you've received this message in error, please reach out through a comment on this PR. CLA has not been signed by users: @ankit-khare-2015 |
|
I have completed the Individual CLA form for @ankit-khare-2015. Could you please re-run/check the CLA status for this PR? |
Resolves #11707
Problem
Catalog definitions are currently loaded only from a dedicated root-level
catalogs.ymlfile.This prevents users from defining
catalogsin regular schema YAML files (for example,models/schema.yml), unlikegroups, which can be defined in any schema YAML file.Solution
This PR updates catalog loading so
catalogscan be defined in any schema YAML file under project source paths, while preserving support for rootcatalogs.yml.Changes included:
core/dbt/config/catalogs.py:catalogs.ymlif presentall_source_paths)catalogs:entriescore/dbt/cli/requires.py:ctx_project.all_source_pathsintoload_catalogs(...)so runtime commands load catalogs from schema YAML filescore/dbt/jsonschemas/resources/latest.json:catalogsas a valid top-level key for resource YAML schema validationtests/unit/config/test_catalogs.py(new): verifies loading from schema YAML and merge behavior with rootcatalogs.ymltests/functional/catalogs/test_catalogs_parsing.py: adds end-to-end regression proving catalogs frommodels/schema.ymlare loaded and appliedChecklist