From eceea2abf918b5f7a6b8dcac792b7825411f9132 Mon Sep 17 00:00:00 2001 From: Devon Fulcher Date: Fri, 6 Oct 2023 10:03:18 -0500 Subject: [PATCH] fixed error message for entity in filter spec and where clause --- .changes/unreleased/Under the Hood-20231006-100304.yaml | 6 ++++++ .../parsing/where_filter/parameter_set_factory.py | 5 +---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 .changes/unreleased/Under the Hood-20231006-100304.yaml diff --git a/.changes/unreleased/Under the Hood-20231006-100304.yaml b/.changes/unreleased/Under the Hood-20231006-100304.yaml new file mode 100644 index 00000000..12e7d011 --- /dev/null +++ b/.changes/unreleased/Under the Hood-20231006-100304.yaml @@ -0,0 +1,6 @@ +kind: Under the Hood +body: Fix error message for entity in filter spec and where parameter +time: 2023-10-06T10:03:04.514682-05:00 +custom: + Author: DevonFulcher + Issue: None diff --git a/dbt_semantic_interfaces/parsing/where_filter/parameter_set_factory.py b/dbt_semantic_interfaces/parsing/where_filter/parameter_set_factory.py index bbcfc722..a268b13d 100644 --- a/dbt_semantic_interfaces/parsing/where_filter/parameter_set_factory.py +++ b/dbt_semantic_interfaces/parsing/where_filter/parameter_set_factory.py @@ -84,10 +84,7 @@ def create_entity(entity_name: str, entity_path: Sequence[str] = ()) -> EntityCa """Gets called by Jinja when rendering {{ Entity(...) }}.""" group_by_item_name = DunderedNameFormatter.parse_name(entity_name) if len(group_by_item_name.entity_links) > 0 or group_by_item_name.time_granularity is not None: - ParameterSetFactory._exception_message_for_incorrect_format( - f"Name is in an incorrect format: {entity_name} " - f"When referencing entities, the name should not have any dunders (double underscores, or __)." - ) + ParameterSetFactory._exception_message_for_incorrect_format(entity_name) return EntityCallParameterSet( entity_path=tuple(EntityReference(element_name=arg) for arg in entity_path),