-
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
[CT-767] [Feature] Supporting on-the-fly configuration of target-path
#5399
Comments
target-path
target-path
This PR implements `--target-path` CLI flag to customize `target-path` on a run-level (instead of the existing way of parametrizing it on the project-level). Resolves dbt-labs#5399.
This PR implements `--target-path` CLI flag to customize `target-path` on a run-level (instead of the existing way of parametrizing it on the project-level). Resolves dbt-labs#5399.
@isidentical Thanks for opening! This feels related to #5132, in that there's a larger desire to override "path" configs set in
It's already possible to achieve the precedence in 2+3 by explicitly passing an environment variable into # dbt_project.yml
target-path: "{{ env_var('TARGET_PATH', 'target') }}"
I think that sort of env var override should be the default/implicit behavior, too. So, I'm not strictly opposed to the one-off addition in #5402. But what I'd really love is a consistent approach that:
Would you be interested in attempting that in #5402? |
Also: We should find some way to square config that's set in That's out of the scope of this issue/PR, but it felt like a relevant place to leave the thought for now. |
Thanks a lot for your answer @jtcohen6! Two quick questions before I start the implementation:
Should #5402 initially aim for adding only the environment variables (which would solve the issue for us / and for the other people who have the use cases I've shared) or should it add both the env vars and the cli flags? For the environment variables, are the following namings make sense or should we consider
|
I'd much prefer to thread these through the same centralized The |
Is this your first time opening an issue?
Describe the Feature
A flag (like
--target-path=
or--target-dir=
) to customize thetarget-path
variable used bydbt run
(and others) temporarily. If there is already atarget-path
set in the configuration file, this option will override it for the samerun
.Describe alternatives you've considered
An environment variable (like
DBT_TARGET_PATH
) would also be an alternative. The benefits include the ease of implementation (not needing to add the precise config option to each subcommand that needs to deal withtarget-path
). But it would reduce the chances of discovery (since--help
won't show it by default).Who will this benefit?
Anyone who has more than 1 DBT subprocess running at any given time. Our use case involves spawning multiple DBT subprocesses, and sometimes they clash and override each other's
run_results.json
files.Are you interested in contributing this feature?
Yes
Anything else?
For more context, please see this thread in DBT's slack channel.
The text was updated successfully, but these errors were encountered: