Skip to content

Commit

Permalink
Add ShowNode and CompiledNode to PrintEvent as special case, qu…
Browse files Browse the repository at this point in the history
…iet-compatible events (#216)

* Add ShowNode and CompiledNode to PrintEvent as special case, quiet-compatible events

* Changelog entry

* Update changelog entry
  • Loading branch information
dbeatty10 authored Nov 19, 2024
1 parent e323644 commit 9bd1064
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20241105-093150.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Include JSON and text output in quiet mode for `dbt show` and `dbt compile`
time: 2024-11-05T09:31:50.780898-06:00
custom:
Author: dbeatty10
Issue: "216"
4 changes: 2 additions & 2 deletions dbt_common/events/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
from dbt_common.events.format import timestamp_to_datetime_string
from dbt_common.utils.encoding import ForgivingJSONEncoder

PRINT_EVENT_NAME = "PrintEvent"
PRINT_EVENT_NAMES = ("PrintEvent", "ShowNode", "CompiledNode")


def _is_print_event(msg: EventMsg) -> bool:
return msg.info.name == PRINT_EVENT_NAME
return msg.info.name in PRINT_EVENT_NAMES


# A Filter is a function which takes a BaseEvent and returns True if the event
Expand Down

0 comments on commit 9bd1064

Please sign in to comment.