From 9dfe7854b2119886e705b16a8cacdb8b3ff49773 Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Mon, 4 Nov 2024 22:27:19 -0600 Subject: [PATCH 1/3] Add ShowNode and CompiledNode to PrintEvent as special case, quiet-compatible events --- dbt_common/events/logger.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt_common/events/logger.py b/dbt_common/events/logger.py index fae4d9b4..460a01dc 100644 --- a/dbt_common/events/logger.py +++ b/dbt_common/events/logger.py @@ -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 From 90fb4c25a518992b65969965a84fd138ab501802 Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Tue, 5 Nov 2024 09:32:24 -0600 Subject: [PATCH 2/3] Changelog entry --- .changes/unreleased/Features-20241105-093150.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Features-20241105-093150.yaml diff --git a/.changes/unreleased/Features-20241105-093150.yaml b/.changes/unreleased/Features-20241105-093150.yaml new file mode 100644 index 00000000..173f6ffd --- /dev/null +++ b/.changes/unreleased/Features-20241105-093150.yaml @@ -0,0 +1,6 @@ +kind: Features +body: Allow `dbt show` and `dbt compile` to output JSON without extra logs +time: 2024-11-05T09:31:50.780898-06:00 +custom: + Author: dbeatty10 + Issue: "216" From 080cc9a1e5ce05c2dd7610c3b0083f08d4fe72f5 Mon Sep 17 00:00:00 2001 From: Doug Beatty <44704949+dbeatty10@users.noreply.github.com> Date: Mon, 18 Nov 2024 19:30:02 -0700 Subject: [PATCH 3/3] Update changelog entry --- .changes/unreleased/Features-20241105-093150.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changes/unreleased/Features-20241105-093150.yaml b/.changes/unreleased/Features-20241105-093150.yaml index 173f6ffd..6425776c 100644 --- a/.changes/unreleased/Features-20241105-093150.yaml +++ b/.changes/unreleased/Features-20241105-093150.yaml @@ -1,5 +1,5 @@ kind: Features -body: Allow `dbt show` and `dbt compile` to output JSON without extra logs +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