-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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-2767] [Feature] Use --quiet
by default for dbt list --output json
#7994
Comments
--quiet
by default for dbt list --output json
--quiet
by default for dbt list --output json
Thanks @dbeatty10! I agree this would be an improvement, versus requiring all users to read the note in the v1.5 migration guide. I think the implementation here could be fairly tricky, because our event manager (logging system) is initialized before the Thoughts:
dbt-core/core/dbt/task/list.py Lines 145 to 149 in 5d93780
|
Notes from refinement:
|
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Is this your first time submitting a feature request?
Describe the feature
It is often useful to pipe or redirect JSON output of
dbt list
for further downstream processing with a tool like the Python built-injson.tool
or thejq
swiss army knife.It would be nice if the syntax were as simple as this to pretty-print the JSON output:
dbt list --output json | python -m json.tool --json-lines
or this to extract the
name
keys:But currently, the non-error log output needs to be suppressed like this:
See #7987 for an example.
Relevant background
The guide for upgrading to v1.5 says the following:
Describe alternatives you've considered
It's certainly possible to continue to require usage of the
QUIET
config, it's just harder for folks to discover.The problem is that the default option gives output that is un-parsable by any downstream tooling 😢
Who will this benefit?
Anyone that want to do any JSON post-processing in a terminal.
Are you interested in contributing this feature?
No response
Anything else?
If we were to adopt this enhancement request, would we also need/want to add a
--no-quiet
option to remove the suppression of non-error output? I can't think of a particular use-case off-hand, but it wouldn't surprise me if one exists.The text was updated successfully, but these errors were encountered: