-
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-3438] UserConfig
in profiles.yml
-> flags
in dbt_project.yml
#9183
Comments
UserConfig
in profiles.yml
→ flags
in dbt_project.yml
UserConfig
in profiles.yml
→ flags
in dbt_project.yml
UserConfig
in profiles.yml
→ flags
in dbt_project.yml
UserConfig
in profiles.yml
-> flags
in dbt_project.yml
From chatting with @gshank: Let's see what the complexity will be for implementation a "soft" deprecation. If it's a lot of additional work, we should instead opt for a "hard" deprecation in v1.8 (with a lot of prior notice), i.e. stop reading |
Hello :) I'm trying to understand, are you going to allow the use of .env (or dbt.env) files? Or is the project abandoned as the issue is closed ? :) |
Hey @vianmora! Thanks for following up here. We kicked that part out of scope for now, to refocus on:
A few questions for you:
|
@jtcohen6
|
It's be great to support loading variables from .env as this is more consistent with other projects (e.g. meltano, dagster). If we can put secrets in .env then we don't need to also duplicate them to dbt's profiles.yml. |
@conorpp, I've found that adding the prefix |
Would this possibly have caused this issue in sqlfluff (that has definitely been caused by something in |
Curious to understand why this was also released to 1.6 and 1.7? There's nothing on this ticket or the pull request to indicate this should have affected versions other than 1.8 |
@elyobo Thanks for flagging - I've responded on the linked sqlfluff issue. @martanthony You're right, it wasn't our initial intent to backport this change. We decided to do this recently in order to provide existing users with the deprecation warning and mechanism to opt into more-secure (less-surprising) behavior around how built-in materializations from packages are overridden:
Apologies for not reflecting that on this issue in advance. Has it caused any issues for you, besides the one noted above for sqlfluff? |
@jtcohen6 understood – thanks for the prompt response. We have a step in our CI that consumes the output of |
* Handle dbt flags based on version See dbt-labs/dbt-core#9183 * Add change log entry
Doesn't this change cause that everytime we start a new dbt project it will have telemetry enabled by default if we forget to turn it off? Is the environment variable |
This comment suggests some sort of support for '.env' files now exists in dbt. Is this actually the case (given the lack of documentation and further comment here)? |
@bmarcj I don't think it's built in, but I use |
Thanks @elyobo! I'm looking for a minimally invasive solution for my team, so a shell extension might be out the question. |
I couldn't imagine life without |
We currently use
in the profiles.yml of your production dbt user(s). This way, our devs can enjoy text-logs, while we get json output for Airflow and Datadog. Now that flags in the profile are deprecated, I am struggling to re-implement such behaviour. If I add
to dbt_project.yml, the console output for devs is also in json. Using jinja in the flags section does not seem to be supported. My numerous tries of variation of the following did not work How can I display logs in dev console in text, but on production in json? The only "solution" that I can think of is manually adjusting every single of our 50+ dbt calls in the Airflow DAGs by adding "--log-format json" which is cumbersome, error-prone and harder to maintain. |
Housekeeping
Short description
We are deprecating
config
as a thing that is settable inprofiles.yml
. Instead, we will supportflags
indbt_project.yml
For dbt-core v1.8, we should see if the user has defined
config
inprofiles.yml
.flags
fromdbt_project.yml
. The two are mutually exclusive.In a future release, we will remove
UserConfig
fromprofiles.yml
entirely.Acceptance criteria
In
dbt_project.yml
, it will look like:Going forward, some flags will be settable in:
dbt_project.yml
) only. These flags define behaviors tied to the source code in a project, and should remain consistent across all users, environments, and invocations of that project.--project-dir
or--log-path
. Some want to vary across commands, such as--full-refresh
. Environment variables are best suited to flags that want different settings in different environments, such as turningDBT_FAIL_FAST
on in dev/CI but not in prod.If set in both places, the inheritance hierarchy remains the same:
click
)click
)User configProject flagsImplementation Notes
UserConfig
toProjectFlags
Testing:
Impact to Other Teams
N/A
Will backports be required?
no :)
Context
Implications of deprecation
Why was this called
UserConfig
before? Well... hypothetically, if Michelle wants colorized logs, and Jeremy doesn't, they should be able to set user-specific preferences that apply across all their projects, without checking those preferences into those projects' version control (becauseprofiles.yml
lives in the HOME directory on each machine). While we are removingUserConfig
fromprofiles.yml
, it will remain possible to set user-specific preferences by setting environment variables (in.bashrc
,.zshrc
, etc).The text was updated successfully, but these errors were encountered: