diff --git a/metricflow-semantics/metricflow_semantics/test_helpers/snapshot_helpers.py b/metricflow-semantics/metricflow_semantics/test_helpers/snapshot_helpers.py index 5d75f9e1d..0448e201e 100644 --- a/metricflow-semantics/metricflow_semantics/test_helpers/snapshot_helpers.py +++ b/metricflow-semantics/metricflow_semantics/test_helpers/snapshot_helpers.py @@ -56,6 +56,7 @@ def assert_snapshot_text_equal( expectation_description: Optional[str] = None, ) -> None: """Similar to assert_plan_snapshot_text_equal(), but with more controls on how the snapshot paths are generated.""" + logger.debug(LazyFormat("Checking the generated snapshot with what's stored", generated_snapshot=snapshot_text)) file_path = ( str( snapshot_path_prefix( diff --git a/metricflow/dataset/sql_dataset.py b/metricflow/dataset/sql_dataset.py index b38da6091..9d3a944ef 100644 --- a/metricflow/dataset/sql_dataset.py +++ b/metricflow/dataset/sql_dataset.py @@ -5,6 +5,7 @@ from dbt_semantic_interfaces.references import SemanticModelReference from metricflow_semantics.assert_one_arg import assert_exactly_one_arg_set from metricflow_semantics.instances import EntityInstance, InstanceSet +from metricflow_semantics.mf_logging.lazy_formattable import LazyFormat from metricflow_semantics.specs.column_assoc import ColumnAssociation from metricflow_semantics.specs.dimension_spec import DimensionSpec from metricflow_semantics.specs.entity_spec import EntitySpec @@ -52,7 +53,14 @@ def checked_sql_select_node(self) -> SqlSelectStatementNode: Otherwise, an exception is thrown. """ if self._sql_select_node is None: - raise RuntimeError(f"{self} was created with a SQL node that is not a {SqlSelectStatementNode}") + raise RuntimeError( + str( + LazyFormat( + f"{self} was created with a SQL node that is not a {SqlSelectStatementNode}", + sql_node=self.sql_node.structure_text(), + ) + ) + ) return self._sql_select_node def column_associations_for_entity(