diff --git a/metricflow/dataflow/dataflow_plan.py b/metricflow/dataflow/dataflow_plan.py index 808c481da2..640a50be3f 100644 --- a/metricflow/dataflow/dataflow_plan.py +++ b/metricflow/dataflow/dataflow_plan.py @@ -186,7 +186,5 @@ def __init__(self, sink_nodes: Sequence[DataflowPlanNode], plan_id: Optional[Dag ) @property - def checked_sink_node(self) -> DataflowPlanNode: - """If this has a single sink node, return it. Otherwise, raise an exception.""" - assert len(self._sink_nodes) == 1, f"Exactly 1 sink node is supported. Got: {self._sink_nodes}" + def sink_node(self) -> DataflowPlanNode: # noqa: D102 return self._sink_nodes[0] diff --git a/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py b/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py index d669a7c8dc..38bc6c4a56 100644 --- a/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py +++ b/metricflow/dataflow/optimizer/source_scan/source_scan_optimizer.py @@ -281,12 +281,12 @@ def visit_metric_time_dimension_transform_node( # noqa: D102 return self._default_base_output_handler(node) def optimize(self, dataflow_plan: DataflowPlan) -> DataflowPlan: # noqa: D102 - optimized_result: OptimizeBranchResult = dataflow_plan.checked_sink_node.accept(self) + optimized_result: OptimizeBranchResult = dataflow_plan.sink_node.accept(self) logger.log( level=self._log_level, msg=f"Optimized:\n\n" - f"{dataflow_plan.checked_sink_node.structure_text()}\n\n" + f"{dataflow_plan.sink_node.structure_text()}\n\n" f"to:\n\n" f"{optimized_result.optimized_branch.structure_text()}", ) diff --git a/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py b/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py index 169bd44253..c83b2fe80b 100644 --- a/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py +++ b/tests_metricflow/dataflow/optimizer/source_scan/test_source_scan_optimizer.py @@ -109,7 +109,7 @@ def visit_join_conversion_events_node(self, node: JoinConversionEventsNode) -> i return self._sum_parents(node) def count_source_nodes(self, dataflow_plan: DataflowPlan) -> int: # noqa: D102 - return dataflow_plan.checked_sink_node.accept(self) + return dataflow_plan.sink_node.accept(self) def check_optimization( # noqa: D103 diff --git a/tests_metricflow/plan_conversion/dataflow_to_sql/test_conversion_metrics_to_sql.py b/tests_metricflow/plan_conversion/dataflow_to_sql/test_conversion_metrics_to_sql.py index ee3fc5404d..074d13951e 100644 --- a/tests_metricflow/plan_conversion/dataflow_to_sql/test_conversion_metrics_to_sql.py +++ b/tests_metricflow/plan_conversion/dataflow_to_sql/test_conversion_metrics_to_sql.py @@ -45,7 +45,7 @@ def test_conversion_rate( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -80,7 +80,7 @@ def test_conversion_rate_with_window( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -106,7 +106,7 @@ def test_conversion_rate_with_no_group_by( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -132,7 +132,7 @@ def test_conversion_count_with_no_group_by( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -166,7 +166,7 @@ def test_conversion_rate_with_constant_properties( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -195,5 +195,5 @@ def test_conversion_metric_join_to_timespine_and_fill_nulls_with_0( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/plan_conversion/dataflow_to_sql/test_distinct_values_to_sql.py b/tests_metricflow/plan_conversion/dataflow_to_sql/test_distinct_values_to_sql.py index 8319f4a84e..2898dedfa9 100644 --- a/tests_metricflow/plan_conversion/dataflow_to_sql/test_distinct_values_to_sql.py +++ b/tests_metricflow/plan_conversion/dataflow_to_sql/test_distinct_values_to_sql.py @@ -38,7 +38,7 @@ def test_dimensions_requiring_join( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -66,5 +66,5 @@ def test_dimension_values_with_a_join_and_a_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/plan_conversion/dataflow_to_sql/test_metric_time_dimension_to_sql.py b/tests_metricflow/plan_conversion/dataflow_to_sql/test_metric_time_dimension_to_sql.py index 30f91f213c..15e8da4a9f 100644 --- a/tests_metricflow/plan_conversion/dataflow_to_sql/test_metric_time_dimension_to_sql.py +++ b/tests_metricflow/plan_conversion/dataflow_to_sql/test_metric_time_dimension_to_sql.py @@ -93,5 +93,5 @@ def test_simple_query_with_metric_time_dimension( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py index 4fa68e8d74..3bf34c2236 100644 --- a/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py +++ b/tests_metricflow/plan_conversion/test_dataflow_to_sql_plan.py @@ -1101,7 +1101,7 @@ def test_compute_metrics_node_ratio_from_multiple_semantic_models( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -1187,7 +1187,7 @@ def test_dimensions_requiring_join( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -1213,5 +1213,5 @@ def test_dimension_with_joined_where_constraint( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/query_rendering/test_cumulative_metric_rendering.py b/tests_metricflow/query_rendering/test_cumulative_metric_rendering.py index 6fb5bece6d..153fca4727 100644 --- a/tests_metricflow/query_rendering/test_cumulative_metric_rendering.py +++ b/tests_metricflow/query_rendering/test_cumulative_metric_rendering.py @@ -54,7 +54,7 @@ def test_cumulative_metric( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -95,7 +95,7 @@ def test_cumulative_metric_with_time_constraint( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -133,7 +133,7 @@ def test_cumulative_metric_with_non_adjustable_time_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -160,7 +160,7 @@ def test_cumulative_metric_no_ds( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -193,7 +193,7 @@ def test_cumulative_metric_no_window( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -223,7 +223,7 @@ def test_cumulative_metric_no_window_with_time_constraint( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -256,7 +256,7 @@ def test_cumulative_metric_grain_to_date( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -286,7 +286,7 @@ def test_cumulative_metric_month( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=extended_date_dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -315,5 +315,5 @@ def test_cumulative_metric_with_agg_time_dimension( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/query_rendering/test_derived_metric_rendering.py b/tests_metricflow/query_rendering/test_derived_metric_rendering.py index 6551fa1a11..f19c13af67 100644 --- a/tests_metricflow/query_rendering/test_derived_metric_rendering.py +++ b/tests_metricflow/query_rendering/test_derived_metric_rendering.py @@ -51,7 +51,7 @@ def test_derived_metric( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -75,7 +75,7 @@ def test_nested_derived_metric( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -99,7 +99,7 @@ def test_derived_metric_with_offset_window( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -130,7 +130,7 @@ def test_derived_metric_with_offset_window_and_time_filter( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -154,7 +154,7 @@ def test_derived_metric_with_offset_to_grain( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -178,7 +178,7 @@ def test_derived_metric_with_offset_window_and_offset_to_grain( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -202,7 +202,7 @@ def test_derived_offset_metric_with_one_input_metric( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -226,7 +226,7 @@ def test_derived_metric_with_offset_window_and_granularity( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -250,7 +250,7 @@ def test_derived_metric_with_month_dimension_and_offset_window( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=extended_date_dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -274,7 +274,7 @@ def test_derived_metric_with_offset_to_grain_and_granularity( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -298,7 +298,7 @@ def test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -322,7 +322,7 @@ def test_derived_offset_cumulative_metric( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -347,7 +347,7 @@ def test_nested_offsets( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -372,7 +372,7 @@ def test_nested_derived_metric_with_offset_multiple_input_metrics( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -404,7 +404,7 @@ def test_nested_offsets_with_where_constraint( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -432,7 +432,7 @@ def test_nested_offsets_with_time_constraint( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -459,7 +459,7 @@ def test_time_offset_metric_with_time_constraint( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -482,7 +482,7 @@ def test_nested_filters( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -510,7 +510,7 @@ def test_cumulative_time_offset_metric_with_time_constraint( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -540,7 +540,7 @@ def test_nested_derived_metric_offset_with_joined_where_constraint_not_selected( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -566,7 +566,7 @@ def test_offset_window_with_agg_time_dim( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -592,7 +592,7 @@ def test_offset_to_grain_with_agg_time_dim( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -618,7 +618,7 @@ def test_derived_offset_metric_with_agg_time_dim( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -646,7 +646,7 @@ def test_multi_metric_fill_null( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -671,7 +671,7 @@ def test_nested_fill_nulls_without_time_spine( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -699,7 +699,7 @@ def test_nested_fill_nulls_without_time_spine_multi_metric( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -725,7 +725,7 @@ def test_offset_window_metric_multiple_granularities( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -751,7 +751,7 @@ def test_offset_to_grain_metric_multiple_granularities( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -780,7 +780,7 @@ def test_offset_window_metric_filter_and_query_have_different_granularities( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -809,5 +809,5 @@ def test_offset_to_grain_metric_filter_and_query_have_different_granularities( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/query_rendering/test_fill_nulls_with_rendering.py b/tests_metricflow/query_rendering/test_fill_nulls_with_rendering.py index 25192e89ed..5adb4e2148 100644 --- a/tests_metricflow/query_rendering/test_fill_nulls_with_rendering.py +++ b/tests_metricflow/query_rendering/test_fill_nulls_with_rendering.py @@ -47,7 +47,7 @@ def test_simple_fill_nulls_with_0_metric_time( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -71,7 +71,7 @@ def test_simple_fill_nulls_with_0_month( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -97,7 +97,7 @@ def test_simple_fill_nulls_with_0_with_non_metric_time( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -121,7 +121,7 @@ def test_simple_fill_nulls_with_0_with_categorical_dimension( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -145,7 +145,7 @@ def test_simple_fill_nulls_without_time_spine( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -169,7 +169,7 @@ def test_cumulative_fill_nulls( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -193,7 +193,7 @@ def test_derived_fill_nulls_for_one_input_metric( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -222,5 +222,5 @@ def test_join_to_time_spine_with_filters( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/query_rendering/test_granularity_date_part_rendering.py b/tests_metricflow/query_rendering/test_granularity_date_part_rendering.py index c845140021..8a853fe3e7 100644 --- a/tests_metricflow/query_rendering/test_granularity_date_part_rendering.py +++ b/tests_metricflow/query_rendering/test_granularity_date_part_rendering.py @@ -45,7 +45,7 @@ def test_simple_query_with_date_part( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -76,7 +76,7 @@ def test_simple_query_with_multiple_date_parts( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -102,5 +102,5 @@ def test_offset_window_with_date_part( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/query_rendering/test_metric_filter_rendering.py b/tests_metricflow/query_rendering/test_metric_filter_rendering.py index 57498b7ed4..96f78e07dd 100644 --- a/tests_metricflow/query_rendering/test_metric_filter_rendering.py +++ b/tests_metricflow/query_rendering/test_metric_filter_rendering.py @@ -35,7 +35,7 @@ def test_query_with_simple_metric_in_where_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -60,7 +60,7 @@ def test_metric_with_metric_in_where_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -87,7 +87,7 @@ def test_query_with_derived_metric_in_where_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -114,7 +114,7 @@ def test_query_with_ratio_metric_in_where_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -144,7 +144,7 @@ def test_query_with_cumulative_metric_in_where_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -171,7 +171,7 @@ def test_query_with_multiple_metrics_in_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -198,7 +198,7 @@ def test_filter_by_metric_in_same_semantic_model_as_queried_metric( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -225,7 +225,7 @@ def test_distinct_values_query_with_metric_filter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -252,7 +252,7 @@ def test_metric_filtered_by_itself( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -278,7 +278,7 @@ def test_group_by_has_local_entity_prefix( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -304,5 +304,5 @@ def test_filter_with_conversion_metric( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/query_rendering/test_metric_time_without_metrics.py b/tests_metricflow/query_rendering/test_metric_time_without_metrics.py index 2f5fd1a917..e83fade1b8 100644 --- a/tests_metricflow/query_rendering/test_metric_time_without_metrics.py +++ b/tests_metricflow/query_rendering/test_metric_time_without_metrics.py @@ -38,7 +38,7 @@ def test_metric_time_only( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -65,7 +65,7 @@ def test_metric_time_quarter_alone( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -92,7 +92,7 @@ def test_metric_time_with_other_dimensions( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -122,5 +122,5 @@ def test_dimensions_with_time_constraint( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/query_rendering/test_query_rendering.py b/tests_metricflow/query_rendering/test_query_rendering.py index 3200e0c8da..af13901435 100644 --- a/tests_metricflow/query_rendering/test_query_rendering.py +++ b/tests_metricflow/query_rendering/test_query_rendering.py @@ -63,7 +63,7 @@ def test_multihop_node( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=multihop_dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -91,7 +91,7 @@ def test_filter_with_where_constraint_on_join_dim( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -121,7 +121,7 @@ def test_partitioned_join( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -152,7 +152,7 @@ def test_limit_rows( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -182,7 +182,7 @@ def test_distinct_values( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -211,7 +211,7 @@ def test_local_dimension_using_local_entity( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -235,7 +235,7 @@ def test_measure_constraint( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -259,7 +259,7 @@ def test_measure_constraint_with_reused_measure( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -284,7 +284,7 @@ def test_measure_constraint_with_single_expr_and_alias( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -313,7 +313,7 @@ def test_join_to_scd_dimension( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=scd_dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -339,7 +339,7 @@ def test_multi_hop_through_scd_dimension( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=scd_dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -365,7 +365,7 @@ def test_multi_hop_to_scd_dimension( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=scd_dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -391,7 +391,7 @@ def test_multiple_metrics_no_dimensions( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -414,7 +414,7 @@ def test_metric_with_measures_from_multiple_sources_no_dimensions( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -438,7 +438,7 @@ def test_common_semantic_model( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -468,7 +468,7 @@ def test_min_max_only_categorical( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -499,7 +499,7 @@ def test_min_max_only_time( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -530,7 +530,7 @@ def test_min_max_only_time_quarter( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -555,7 +555,7 @@ def test_min_max_metric_time( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) @@ -580,5 +580,5 @@ def test_min_max_metric_time_week( mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, ) diff --git a/tests_metricflow/query_rendering/test_time_spine_join_rendering.py b/tests_metricflow/query_rendering/test_time_spine_join_rendering.py index 797f762f70..16b7a5610e 100644 --- a/tests_metricflow/query_rendering/test_time_spine_join_rendering.py +++ b/tests_metricflow/query_rendering/test_time_spine_join_rendering.py @@ -44,5 +44,5 @@ def test_simple_join_to_time_spine( # noqa: D103 mf_test_configuration=mf_test_configuration, dataflow_to_sql_converter=dataflow_to_sql_converter, sql_client=sql_client, - node=dataflow_plan.checked_sink_node, + node=dataflow_plan.sink_node, )