You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very frequently I am working on a project and I decide that a dbt project would be a great addition to an existing (mature) project. However, the way that dbt init works seems to leave a lot to be desired in this workflow.
dbt init seems to be designed to be run for greenfield projects or existing dbt projects and by default the project scaffold goes in a subdirectory instead of the root directory.
Desired behavior: A command line argument for dbt init that specifies that the files should be created in the current directory instead of a named directory, or the ability for dbt init to parse . as its argument.
Naming your project the same name as an existing package results in an error
Desired behavior: Providing an existing folder as an argument to dbt init should create the scaffold files in that folder.
dbt init doesn't look in subdirectories for dbt_project.yml. There may be some existing reason why this is the case, but when combined with the first bullet point, it means that, to my knowledge, i cant run a dbt project without cd-ing into the dbt project folder first (or specifying a command line argument every time... maybe this is configurable? But regardless, not ideal).
Desired behavior (complications likely): dbt cli commands should check subfolders for dbt-project.yml, or allow for a config that sets a different file e.g. pyproject.toml as the default root directory.
These are just the 3 most salient complications but overall I would love to see dbt take a less presumptuous approach when it comes to project structure :)
As such, I'm going to attempt to find the most painless way to configure a project like this and maybe start some documentation on it?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
Very frequently I am working on a project and I decide that a dbt project would be a great addition to an existing (mature) project. However, the way that
dbt init
works seems to leave a lot to be desired in this workflow.dbt init
seems to be designed to be run for greenfield projects or existing dbt projects and by default the project scaffold goes in a subdirectory instead of the root directory.dbt init
that specifies that the files should be created in the current directory instead of a named directory, or the ability fordbt init
to parse.
as its argument.dbt init
should create the scaffold files in that folder.dbt init
doesn't look in subdirectories for dbt_project.yml. There may be some existing reason why this is the case, but when combined with the first bullet point, it means that, to my knowledge, i cant run a dbt project withoutcd
-ing into the dbt project folder first (or specifying a command line argument every time... maybe this is configurable? But regardless, not ideal).These are just the 3 most salient complications but overall I would love to see dbt take a less presumptuous approach when it comes to project structure :)
As such, I'm going to attempt to find the most painless way to configure a project like this and maybe start some documentation on it?
Beta Was this translation helpful? Give feedback.
All reactions