Skip to content
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

Add a command line flag to enable or disable color output #2192

Closed
Matt343 opened this issue Mar 10, 2020 · 5 comments · Fixed by #2708
Closed

Add a command line flag to enable or disable color output #2192

Matt343 opened this issue Mar 10, 2020 · 5 comments · Fixed by #2708
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors!

Comments

@Matt343
Copy link

Matt343 commented Mar 10, 2020

Describe the feature

The use_colors config option enables or disables console escape codes in the DBT command output, but you cannot currently override the value from profiles.yml when running a command. Adding --use-colors and --no-use-colors (similar to how partial parsing is handled) would allow us to be explicit with what output format we need in each environment without needing completely separate profiles.yml files.

Describe alternatives you've considered

We handle other environment specific values in profiles.yml using env_var Jinja blocks, but the boolean options in the config section do not seem to support that mechanism.

Additional context

Who will this benefit?

DBT command line users who want to configure color output differently for different commands/contexts, or who want color output usually but occasionally pipe the output of DBT into other tools.

@Matt343 Matt343 added enhancement New feature or request triage labels Mar 10, 2020
@drewbanin drewbanin added good_first_issue Straightforward + self-contained changes, good for new contributors! enhancement New feature or request and removed triage enhancement New feature or request labels Mar 18, 2020
@drewbanin
Copy link
Contributor

drewbanin commented Mar 18, 2020

Thanks for the report @Matt343! I think we'll have a good answer on boolean env vars for 0.17.0, but I'm not opposed to --use-colors and --no-use-colors flags. Feel free to send through a PR for those flags if you're interested! :D

@invinceyble
Copy link

I'd be keen to work on this if @Matt343 isn't. I haven't looked too closely at everything, but I suspect it might look similar to this commit, is that right? c38c8d5

@drewbanin
Copy link
Contributor

hey @invinceyble - I think c38c8d5 is a great source of inspiration for this flag :)

@rsenseman
Copy link
Contributor

@invinceyble Are you working on this? If not, I can pick this up this week

@invinceyble
Copy link

invinceyble commented Jul 6, 2020

@invinceyble Are you working on this? If not, I can pick this up this week

@rsenseman Totally slipped off my radar, all yours! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good_first_issue Straightforward + self-contained changes, good for new contributors!
Projects
None yet
4 participants