Skip to content

[Feature] Allow dbt show to output json data without extra logs (by updating --quiet)  #9840

@b-per

Description

@b-per

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

I would like the output of dbt show to be valid JSON, containing just the data and no logs.

Some potential solutions:

  • dbt show could change its behaviour for --quiet, printing the results.
  • or we could have a new parameter to dbt show that performs this behaviour if we don't want to change the --quiet behaviour

What I want to achieve is to pipe a dbt show ... --output json into jq or jless. Today dbt --quiet show ... doesn't print anything to stdout, which feels counterintuitive (is it a bug actually?)

Describe alternatives you've considered

As suggested in the Community Slack I tried dbt --log-format json show ... --output=json ; but while the data is valid JSON, it doesn't show the results in a nice way as the real data results are encoded in a single string with escaped characters.

Who will this benefit?

People using the CLI and wanting a better/usable way to explorer the results of dbt show.

Are you interested in contributing this feature?

Yes

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestshowrelated to the dbt show commandstaleIssues that have gone stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions