Be able to !include external yaml files
See original GitHub issueDescribe the feature
Sometimes its useful to reuse yaml (especially the schema.yml sections relating to docs). In my case, I have tables in different schemas and sometimes I have a view to the same table (except with different permissions). Ultimately though the view is just a select * from table_xyz
, so the docs are the same. I don’t want to have to maintain the documentation twice, and would prefer just to link to it.
The quick way to do this would be to allow external file linking as described here (https://stackoverflow.com/questions/528281/how-can-i-include-a-yaml-file-inside-another)
This is transparent to dbt and handled by the yaml loader.
Describe alternatives you’ve considered
Duplicating the documentation
Additional context
Who will this benefit?
Anyone who wants to reuse parts of their yaml files
Issue Analytics
- State:
- Created 4 years ago
- Reactions:14
- Comments:11 (7 by maintainers)
Top Results From Across the Web
How can I include a YAML file inside another?
No, standard YAML does not include any kind of "import" or "include" statement.
Read more >Including YAML configuration files inside another ...
You can include further files in an included file. Instead of a file name, you can also specify the name of a directory...
Read more >Be able to !include external yaml files · Issue #1790 · dbt- ...
Sometimes its useful to reuse yaml (especially the schema.yml sections relating to docs). In my case, I have tables in different schemas and ......
Read more >Referencing YAML from an External File
Referencing YAML from an External File. This is an example for how you can reference an 'external' yaml from a separate file.
Read more >GitLab CI/CD include examples
You can use include to include external YAML files in your CI/CD jobs. Include a single configuration file. To include a single configuration...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
similar but different use case: I was hoping to be able to reference a non-
schema.yml
yaml file in amodel.sql
context to take advantage of the fromyaml context method.I basically have a model that looks like this
and was thinking it would be good to be able to maintain
my_yml_str
in a separate .yml file rather than in the model itselfplease reopen