-
Notifications
You must be signed in to change notification settings - Fork 4
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
Feature: Use dbt-core starter project as baseline for split projects #206
Feature: Use dbt-core starter project as baseline for split projects #206
Conversation
…s basis for split projects
…ted dbt_project.yml file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🦞
# was getting a weird serialization error from ruamel on this value | ||
# it's been deprecated, so no reason to keep it | ||
contents.pop("version") | ||
|
||
# this one appears in the project yml, but i don't think it should be written | ||
contents.pop("query-comment") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i remember this line being pretty /shrug at the time i wrote it -- any chance you tested removing this line and seeing if it worked? I feel like it may not in be in the yml from the starter project, and therefore not something we'd need to worry about anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on my tests, if we remove it from here, it will be rendered in the sub-project's dbt_project.yml
. Is that the desired behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no i wouldn't say so 😅 i think my thought was that it may no longer be in the YML we start with now that we're using the official starter project file. if it's still there, I'd vote not to render it
Description and motivation
A common question for users of dbt-meshify is "why does the split project look ... odd?" In most cases, this is a byproduct of the existing
split
command creating only necessary directories and files in the split project. While functional, this is not the ideal experience for users.This PR updates our method for creating projects, to instead start by creating a new starter project in the target directory, add all directories and files of interest, and then update the starter
dbt_project.yml
file using the sub-project's configuration information. The benefits to this approach are:dbt_project.yml
file experience.Along the way, I also implemented the following:
Directorychange
), file manager (DirectoryManager
) and directory editor (DirectoryEditor
) for interacting with directory structures instead of files. Some minor refactoring was implemented along the way.Resolves: #124
Resolves: #153
Example
dbt_project.yml
Note the preserved comments and formatting in the bog-standard parts of the YAML file.