-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Be able to !include external yaml files #1790
Comments
This is a cool idea, thanks @whisperstream! dbt does funky things with file paths, but I bet there's a way to make this work :) |
For this particular use-case, check out docs blocks if you haven't already. You'll still need to enumerate the columns for each model, but you can reference the docs blocks instead of re-typing the table/column descriptions. Additionally, you may be able to use yaml anchors if you're able to define the docs for both of these models in the same file. |
have used the docs blocks already and have used yaml anchors before, but let me make a PR and test out the include and see how dbt gets on with it and you can decide to merge or not? |
sure, sounds good! Full disclosure, we might not merge this in the near-term -- we in general try to be careful about allowing arbitrary file access in the dbt context. There are things we can do here that may assuage this concern, so sure, I'd love to see a PR if you're able to send one through :) |
similar but different use case: I was hoping to be able to reference a non- I basically have a model that looks like this
and was thinking it would be good to be able to maintain |
@drewbanin unless @whisperstream has already put a PR together, would you still be interested in seeing one? I believe the ability to Thanks! |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Well, it's been a while and it seems like this issue will get closed in a few days, so let me just summarize what I think could be done here.
Going by @drewbanin's comment above, I am still not sure to what extent does it make sense to try to implement this but if it sounds feasible, I might still take a stab at it at some point 🙂 Thanks! |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers. |
please reopen |
It's useful to reuse yaml, please reopen |
Please reopen! Being able to |
There is a new ticket with similar content: #9695 |
Describe 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
The text was updated successfully, but these errors were encountered: