[Feature] Add ability to import/include YAML from other files #9695
Labels
enhancement
New feature or request
paper_cut
A small change that impacts lots of users in their day-to-day
Refinement
Maintainer input needed
Is this your first time submitting a feature request?
Describe the feature
I wonder if dbt would benefit from providing the ability to include YAML snippets from other files.
Home Assistant (a popular python tool, leveraging YAML for config), provides a few additional YAML constructors (quick overview of constructors).
The most interesting one would be
!include
which allows to define values of keys in YAML from other YAML filesThe implementation of Home Assistant is in this source file.
While we can define some logic in Jinja in some YAML files, we are limited today to defining a single entry at a time (e.g. a string or a bool). With this approach we can also store config for nested fields.
Based on my first observations, this technique wouldn't mess with the current dbt code as the YAML is rendered before we start any "real" dbt parsing.
Describe alternatives you've considered
Copy pasting the same logic in YAML as we do today
Who will this benefit?
dbt_project.yml
from different files, with different code owners in gitAre you interested in contributing this feature?
Yes
Anything else?
I got an early prototype working locally and can share some of the code if we want to implement this feature.
The text was updated successfully, but these errors were encountered: