-
Notifications
You must be signed in to change notification settings - Fork 105
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
datacontract import --format dbt #104
Comments
I already do something like this for import, creating a datacontract.yaml given a dbt project, but was using the However our code is/was quite specific to the format of the dbt projects we allowed. To do it properly, one would want to parse & use the manifest.json file from a dbt project. It is the most straightforward way of working with dbt projects generically. You would go into dbt Nodes in the manifest, and for every (For parsing the manifest, Dagster-dbt does this as well, and the code is Apache-2 Licensed, if you are looking for inspiration). Much easier of course is to be pointed to a dbt schema.yaml file, and using that for importing the models. Anything not defined in that yaml file would be missed. Then again, maybe that's ok. |
I think the later is fine. As I presume most people with more than a few dbt models split them into a model per file otherwise it gets quite unwieldily very quickly. |
This does not match my experience with larger dbt projects. But one or several models can logically co exist and be part a data contract so it is fine anyway? (It’s reasonable to ask/expect to not mix models from different data products/contracts..) |
I'm looking into this right now |
Awesome! I assigned you the issue. :-) |
@torbenkeller any progress here? |
i've been working with dbt, maybe I can help |
@jochenchrist Was working on other things the last weeks, sorry. But I will continue on this. @teoria sounds good, if you want we can pair program to get this ready |
@teoria you can contact me on the datacontract slack server |
Nice! |
first version of dbt manifest importer Usage: Contract with only 2 models |
Mark this as closed. |
Out of #103 came the idea of having an import of dbt models to a datacontract.yaml
The text was updated successfully, but these errors were encountered: