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

[Feature] Use --quiet by default for dbt show #9843

Open
3 tasks done
dbeatty10 opened this issue Apr 2, 2024 · 0 comments
Open
3 tasks done

[Feature] Use --quiet by default for dbt show #9843

dbeatty10 opened this issue Apr 2, 2024 · 0 comments
Labels
enhancement New feature or request Refinement Maintainer input needed show related to the dbt show command

Comments

@dbeatty10
Copy link
Contributor

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

As described in #9840, It is often useful to pipe or redirect JSON output of dbt show for further downstream processing with a tool like the Python built-in json.tool or the jq swiss army knife.

It would be nice if the syntax were as simple as this to pipe JSON output to a downstream tool:

dbt show -s my_model --output json | python -m json.tool --json-lines

We'd want the --inline flag to be treated the same way as if --select we given instead.

Describe alternatives you've considered

The problem is that we currently need to do some gymnastics with --log-format, --output, and some downstream filtering to extract the desired JSON object 😢

It's certainly possible to require usage of the -q / --quiet flag, but it would be harder for folks to discover that way. If someone passes --output json, they probably want only JSON.

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?

We'd probably want the same behavior for all three of these subcommands:

  • show (assuming a single node is selected)
  • compile (when a single node is selected)
  • list (regardless the number of nodes selected)

See #7994 for more detail about dbt list specifically.

@dbeatty10 dbeatty10 added enhancement New feature or request triage Refinement Maintainer input needed and removed triage labels Apr 2, 2024
@dbeatty10 dbeatty10 added the show related to the dbt show command label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Refinement Maintainer input needed show related to the dbt show command
Projects
None yet
Development

No branches or pull requests

1 participant