-
Notifications
You must be signed in to change notification settings - Fork 112
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
folder_path and model_prefix functionality for generate_model_yaml #106
Comments
Hi @joellabes , do you think this'd be a nice addition to the codegen? If so, I want to polish it up and finish the PR |
Oooooh this is a really good idea! Sorry for the delay in getting back to you. Instead of overloading the generate_model_yaml macro, what about a new macro called something like |
Hi @joellabes , thanks for your input. Your suggestion really makes sense. I created a macro named get_models in macros/helpers directory. It takes directory and prefix arguments. Based on these arguments, it returns an array of matching model_names retrieved from the graph object. Here I completed the PR with all requirements checked: #115 Please let me know if this is good to go! |
Describe the feature
I want to introduce folder_path and model_prefix functionality for generate_model_yaml macro.
This way the macro can be used as:
**Please let me know if you think this'd be a nice addition to the codegen so that I can finalise and submit my PR! **
Describe alternatives you've considered
The alternative to this approach would be providing manually made lists to the macro, which is already possible. It is however time consuming and repetitive. I believe this approach will make dbt folks' lives easier.
Additional context
This feature is not database specific, at least not in my initial design. I basically utilise manifest.json information, to retrieve all models in a project, with model names and folder paths.
Who will this benefit?
These features will be extremely beneficial when we start documenting our dbt projects. Combining the two, we will be able to generate YAMLs for any group of models we desire. I personally used my approach at two of my clients already.
Are you interested in contributing this feature?
Yes I am!
I actually have the PR almost ready, just missing the tests, waiting for the first approval.
The text was updated successfully, but these errors were encountered: