From 7601b3d1d9221fa62a104bc92fdacf30ae8dc05d Mon Sep 17 00:00:00 2001 From: Michelle Ark Date: Mon, 28 Oct 2024 22:19:51 -0400 Subject: [PATCH] better error message + test --- core/dbt/events/types.py | 2 +- tests/unit/test_events.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/dbt/events/types.py b/core/dbt/events/types.py index 87b952fc492..6274ee72326 100644 --- a/core/dbt/events/types.py +++ b/core/dbt/events/types.py @@ -931,7 +931,7 @@ def code(self) -> str: def message(self) -> str: msg = ( f"The microbatch model '{self.model_name}' has no 'ref' or 'source' input with an 'event_time' configuration. " - "This can result in unexpected duplicate records in the resulting microbatch model." + "\nThis means no filtering can be applied and can result in unexpected duplicate records in the resulting microbatch model." ) return warning_tag(msg) diff --git a/tests/unit/test_events.py b/tests/unit/test_events.py index f6ac66f0034..c713221e80e 100644 --- a/tests/unit/test_events.py +++ b/tests/unit/test_events.py @@ -286,6 +286,7 @@ def test_event_codes(self): core_types.WarnStateTargetEqual(state_path=""), core_types.FreshnessConfigProblem(msg=""), core_types.SemanticValidationFailure(msg=""), + core_types.MicrobatchModelNoEventTimeInputs(model_name=""), # M - Deps generation ====================== core_types.GitSparseCheckoutSubdirectory(subdir=""), core_types.GitProgressCheckoutRevision(revision=""),