From 967431c48c6d2269ba38906deea1a0334f0f1dbe Mon Sep 17 00:00:00 2001 From: tlento Date: Thu, 2 Nov 2023 16:44:32 -0700 Subject: [PATCH] Move cumulative metric query rendering tests to new module The test_dataflow_to_sql_plan module is being broken up into smaller pieces. This one covers all cumulative metric rendering tests. --- .../test_dataflow_to_sql_plan.py | 198 -------- .../test_cumulative_metric_rendering.py | 219 +++++++++ .../test_cumulative_metric__plan0.sql | 0 ...est_cumulative_metric__plan0_optimized.sql | 0 ...cumulative_metric_grain_to_date__plan0.sql | 0 ..._metric_grain_to_date__plan0_optimized.sql | 0 .../test_cumulative_metric_no_ds__plan0.sql | 0 ...mulative_metric_no_ds__plan0_optimized.sql | 0 ...est_cumulative_metric_no_window__plan0.sql | 0 ...tive_metric_no_window__plan0_optimized.sql | 0 ..._no_window_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 ...ive_metric_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 .../test_cumulative_metric__plan0.sql | 0 ...est_cumulative_metric__plan0_optimized.sql | 0 ...cumulative_metric_grain_to_date__plan0.sql | 0 ..._metric_grain_to_date__plan0_optimized.sql | 0 .../test_cumulative_metric_no_ds__plan0.sql | 0 ...mulative_metric_no_ds__plan0_optimized.sql | 0 ...est_cumulative_metric_no_window__plan0.sql | 0 ...tive_metric_no_window__plan0_optimized.sql | 0 ..._no_window_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 ...ive_metric_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 .../DuckDB/test_cumulative_metric__plan0.sql | 0 ...est_cumulative_metric__plan0_optimized.sql | 0 ...cumulative_metric_grain_to_date__plan0.sql | 0 ..._metric_grain_to_date__plan0_optimized.sql | 0 .../test_cumulative_metric_no_ds__plan0.sql | 0 ...mulative_metric_no_ds__plan0_optimized.sql | 0 ...est_cumulative_metric_no_window__plan0.sql | 0 ...tive_metric_no_window__plan0_optimized.sql | 0 ..._no_window_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 ...ive_metric_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 .../test_cumulative_metric__plan0.sql | 0 ...est_cumulative_metric__plan0_optimized.sql | 0 ...cumulative_metric_grain_to_date__plan0.sql | 0 ..._metric_grain_to_date__plan0_optimized.sql | 0 .../test_cumulative_metric_no_ds__plan0.sql | 0 ...mulative_metric_no_ds__plan0_optimized.sql | 0 ...est_cumulative_metric_no_window__plan0.sql | 0 ...tive_metric_no_window__plan0_optimized.sql | 0 ..._no_window_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 ...ive_metric_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 .../test_cumulative_metric__plan0.sql | 0 ...est_cumulative_metric__plan0_optimized.sql | 0 ...cumulative_metric_grain_to_date__plan0.sql | 0 ..._metric_grain_to_date__plan0_optimized.sql | 0 .../test_cumulative_metric_no_ds__plan0.sql | 0 ...mulative_metric_no_ds__plan0_optimized.sql | 0 ...est_cumulative_metric_no_window__plan0.sql | 0 ...tive_metric_no_window__plan0_optimized.sql | 0 ..._no_window_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 ...ive_metric_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 .../test_cumulative_metric__plan0.sql | 0 ...est_cumulative_metric__plan0_optimized.sql | 0 ...cumulative_metric_grain_to_date__plan0.sql | 0 ..._metric_grain_to_date__plan0_optimized.sql | 0 .../test_cumulative_metric_no_ds__plan0.sql | 0 ...mulative_metric_no_ds__plan0_optimized.sql | 0 ...est_cumulative_metric_no_window__plan0.sql | 0 ...tive_metric_no_window__plan0_optimized.sql | 0 ..._no_window_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 ...ive_metric_with_time_constraint__plan0.sql | 0 ..._with_time_constraint__plan0_optimized.sql | 0 .../test_cumulative_metric__plan0.xml | 311 ------------ ...cumulative_metric_grain_to_date__plan0.xml | 311 ------------ .../test_cumulative_metric_no_ds__plan0.xml | 295 ----------- ...est_cumulative_metric_no_window__plan0.xml | 311 ------------ ..._no_window_with_time_constraint__plan0.xml | 462 ------------------ ...ive_metric_with_time_constraint__plan0.xml | 462 ------------------ 80 files changed, 219 insertions(+), 2350 deletions(-) create mode 100644 metricflow/test/query_rendering/test_cumulative_metric_rendering.py rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql (100%) rename metricflow/test/snapshots/{test_dataflow_to_sql_plan.py => test_cumulative_metric_rendering.py}/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql (100%) delete mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric__plan0.xml delete mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_grain_to_date__plan0.xml delete mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_ds__plan0.xml delete mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window__plan0.xml delete mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window_with_time_constraint__plan0.xml delete mode 100644 metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_with_time_constraint__plan0.xml diff --git a/metricflow/test/plan_conversion/test_dataflow_to_sql_plan.py b/metricflow/test/plan_conversion/test_dataflow_to_sql_plan.py index 4c4d143e44..6368e85e1e 100644 --- a/metricflow/test/plan_conversion/test_dataflow_to_sql_plan.py +++ b/metricflow/test/plan_conversion/test_dataflow_to_sql_plan.py @@ -1011,204 +1011,6 @@ def test_compute_metrics_node_ratio_from_multiple_semantic_models( ) -@pytest.mark.sql_engine_snapshot -def test_cumulative_metric( - request: FixtureRequest, - mf_test_session_state: MetricFlowTestSessionState, - dataflow_plan_builder: DataflowPlanBuilder, - dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, - consistent_id_object_repository: ConsistentIdObjectRepository, - sql_client: SqlClient, -) -> None: - """Tests converting a dataflow plan to a SQL query plan where there is a cumulative metric to compute.""" - dataflow_plan = dataflow_plan_builder.build_plan( - MetricFlowQuerySpec( - metric_specs=(MetricSpec(element_name="trailing_2_months_revenue"),), - dimension_specs=(), - time_dimension_specs=( - TimeDimensionSpec( - element_name="ds", - entity_links=(), - time_granularity=TimeGranularity.MONTH, - ), - ), - ) - ) - - convert_and_check( - request=request, - mf_test_session_state=mf_test_session_state, - dataflow_to_sql_converter=dataflow_to_sql_converter, - sql_client=sql_client, - node=dataflow_plan.sink_output_nodes[0].parent_node, - ) - - -@pytest.mark.sql_engine_snapshot -def test_cumulative_metric_with_time_constraint( - request: FixtureRequest, - mf_test_session_state: MetricFlowTestSessionState, - dataflow_plan_builder: DataflowPlanBuilder, - dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, - consistent_id_object_repository: ConsistentIdObjectRepository, - sql_client: SqlClient, -) -> None: - """Tests converting a dataflow plan to a SQL query plan where there is a cumulative metric to compute.""" - dataflow_plan = dataflow_plan_builder.build_plan( - MetricFlowQuerySpec( - metric_specs=(MetricSpec(element_name="trailing_2_months_revenue"),), - dimension_specs=(), - time_dimension_specs=( - TimeDimensionSpec( - element_name="ds", - entity_links=(), - time_granularity=TimeGranularity.MONTH, - ), - ), - time_range_constraint=TimeRangeConstraint( - start_time=as_datetime("2020-01-01"), end_time=as_datetime("2020-01-01") - ), - ) - ) - - convert_and_check( - request=request, - mf_test_session_state=mf_test_session_state, - dataflow_to_sql_converter=dataflow_to_sql_converter, - sql_client=sql_client, - node=dataflow_plan.sink_output_nodes[0].parent_node, - ) - - -@pytest.mark.sql_engine_snapshot -def test_cumulative_metric_no_ds( - request: FixtureRequest, - mf_test_session_state: MetricFlowTestSessionState, - dataflow_plan_builder: DataflowPlanBuilder, - dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, - consistent_id_object_repository: ConsistentIdObjectRepository, - sql_client: SqlClient, -) -> None: - """Tests converting a dataflow plan to a SQL query plan where there is a cumulative metric to compute.""" - dataflow_plan = dataflow_plan_builder.build_plan( - MetricFlowQuerySpec( - metric_specs=(MetricSpec(element_name="trailing_2_months_revenue"),), - dimension_specs=(), - time_dimension_specs=(), - ) - ) - - convert_and_check( - request=request, - mf_test_session_state=mf_test_session_state, - dataflow_to_sql_converter=dataflow_to_sql_converter, - sql_client=sql_client, - node=dataflow_plan.sink_output_nodes[0].parent_node, - ) - - -@pytest.mark.sql_engine_snapshot -def test_cumulative_metric_no_window( - request: FixtureRequest, - mf_test_session_state: MetricFlowTestSessionState, - dataflow_plan_builder: DataflowPlanBuilder, - dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, - consistent_id_object_repository: ConsistentIdObjectRepository, - sql_client: SqlClient, -) -> None: - """Tests converting a dataflow plan to a SQL query plan where there is a windowless cumulative metric to compute.""" - dataflow_plan = dataflow_plan_builder.build_plan( - MetricFlowQuerySpec( - metric_specs=(MetricSpec(element_name="revenue_all_time"),), - dimension_specs=(), - time_dimension_specs=( - TimeDimensionSpec( - element_name="ds", - entity_links=(), - time_granularity=TimeGranularity.MONTH, - ), - ), - ) - ) - - convert_and_check( - request=request, - mf_test_session_state=mf_test_session_state, - dataflow_to_sql_converter=dataflow_to_sql_converter, - sql_client=sql_client, - node=dataflow_plan.sink_output_nodes[0].parent_node, - ) - - -@pytest.mark.sql_engine_snapshot -def test_cumulative_metric_no_window_with_time_constraint( - request: FixtureRequest, - mf_test_session_state: MetricFlowTestSessionState, - dataflow_plan_builder: DataflowPlanBuilder, - dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, - consistent_id_object_repository: ConsistentIdObjectRepository, - sql_client: SqlClient, -) -> None: - """Tests converting a dataflow plan to a SQL query plan where there is a windowless cumulative metric to compute.""" - dataflow_plan = dataflow_plan_builder.build_plan( - MetricFlowQuerySpec( - metric_specs=(MetricSpec(element_name="revenue_all_time"),), - dimension_specs=(), - time_dimension_specs=( - TimeDimensionSpec( - element_name="ds", - entity_links=(), - time_granularity=TimeGranularity.MONTH, - ), - ), - time_range_constraint=TimeRangeConstraint( - start_time=as_datetime("2020-01-01"), end_time=as_datetime("2020-01-01") - ), - ) - ) - - convert_and_check( - request=request, - mf_test_session_state=mf_test_session_state, - dataflow_to_sql_converter=dataflow_to_sql_converter, - sql_client=sql_client, - node=dataflow_plan.sink_output_nodes[0].parent_node, - ) - - -@pytest.mark.sql_engine_snapshot -def test_cumulative_metric_grain_to_date( - request: FixtureRequest, - mf_test_session_state: MetricFlowTestSessionState, - dataflow_plan_builder: DataflowPlanBuilder, - dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, - consistent_id_object_repository: ConsistentIdObjectRepository, - sql_client: SqlClient, -) -> None: - """Tests converting a dataflow plan to a SQL query plan where grain_to_date cumulative metric to compute.""" - dataflow_plan = dataflow_plan_builder.build_plan( - MetricFlowQuerySpec( - metric_specs=(MetricSpec(element_name="revenue_mtd"),), - dimension_specs=(), - time_dimension_specs=( - TimeDimensionSpec( - element_name="ds", - entity_links=(), - time_granularity=TimeGranularity.MONTH, - ), - ), - ) - ) - - convert_and_check( - request=request, - mf_test_session_state=mf_test_session_state, - dataflow_to_sql_converter=dataflow_to_sql_converter, - sql_client=sql_client, - node=dataflow_plan.sink_output_nodes[0].parent_node, - ) - - @pytest.mark.sql_engine_snapshot def test_derived_metric( # noqa: D request: FixtureRequest, diff --git a/metricflow/test/query_rendering/test_cumulative_metric_rendering.py b/metricflow/test/query_rendering/test_cumulative_metric_rendering.py new file mode 100644 index 0000000000..89f323837c --- /dev/null +++ b/metricflow/test/query_rendering/test_cumulative_metric_rendering.py @@ -0,0 +1,219 @@ +"""Tests cumulative metric query rendering by comparing rendered output against snapshot files.""" + +from __future__ import annotations + +import pytest +from _pytest.fixtures import FixtureRequest +from dbt_semantic_interfaces.test_utils import as_datetime +from dbt_semantic_interfaces.type_enums.time_granularity import TimeGranularity + +from metricflow.dataflow.builder.dataflow_plan_builder import DataflowPlanBuilder +from metricflow.filters.time_constraint import TimeRangeConstraint +from metricflow.plan_conversion.dataflow_to_sql import DataflowToSqlQueryPlanConverter +from metricflow.protocols.sql_client import SqlClient +from metricflow.specs.specs import ( + MetricFlowQuerySpec, + MetricSpec, + TimeDimensionSpec, +) +from metricflow.test.fixtures.model_fixtures import ConsistentIdObjectRepository +from metricflow.test.fixtures.setup_fixtures import MetricFlowTestSessionState +from metricflow.test.query_rendering.compare_rendered_query import convert_and_check + + +@pytest.mark.sql_engine_snapshot +def test_cumulative_metric( + request: FixtureRequest, + mf_test_session_state: MetricFlowTestSessionState, + dataflow_plan_builder: DataflowPlanBuilder, + dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, + consistent_id_object_repository: ConsistentIdObjectRepository, + sql_client: SqlClient, +) -> None: + """Tests converting a dataflow plan to a SQL query plan where there is a cumulative metric to compute.""" + dataflow_plan = dataflow_plan_builder.build_plan( + MetricFlowQuerySpec( + metric_specs=(MetricSpec(element_name="trailing_2_months_revenue"),), + dimension_specs=(), + time_dimension_specs=( + TimeDimensionSpec( + element_name="ds", + entity_links=(), + time_granularity=TimeGranularity.MONTH, + ), + ), + ) + ) + + convert_and_check( + request=request, + mf_test_session_state=mf_test_session_state, + dataflow_to_sql_converter=dataflow_to_sql_converter, + sql_client=sql_client, + node=dataflow_plan.sink_output_nodes[0].parent_node, + ) + + +@pytest.mark.sql_engine_snapshot +def test_cumulative_metric_with_time_constraint( + request: FixtureRequest, + mf_test_session_state: MetricFlowTestSessionState, + dataflow_plan_builder: DataflowPlanBuilder, + dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, + consistent_id_object_repository: ConsistentIdObjectRepository, + sql_client: SqlClient, +) -> None: + """Tests converting a dataflow plan to a SQL query plan where there is a cumulative metric to compute.""" + dataflow_plan = dataflow_plan_builder.build_plan( + MetricFlowQuerySpec( + metric_specs=(MetricSpec(element_name="trailing_2_months_revenue"),), + dimension_specs=(), + time_dimension_specs=( + TimeDimensionSpec( + element_name="ds", + entity_links=(), + time_granularity=TimeGranularity.MONTH, + ), + ), + time_range_constraint=TimeRangeConstraint( + start_time=as_datetime("2020-01-01"), end_time=as_datetime("2020-01-01") + ), + ) + ) + + convert_and_check( + request=request, + mf_test_session_state=mf_test_session_state, + dataflow_to_sql_converter=dataflow_to_sql_converter, + sql_client=sql_client, + node=dataflow_plan.sink_output_nodes[0].parent_node, + ) + + +@pytest.mark.sql_engine_snapshot +def test_cumulative_metric_no_ds( + request: FixtureRequest, + mf_test_session_state: MetricFlowTestSessionState, + dataflow_plan_builder: DataflowPlanBuilder, + dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, + consistent_id_object_repository: ConsistentIdObjectRepository, + sql_client: SqlClient, +) -> None: + """Tests converting a dataflow plan to a SQL query plan where there is a cumulative metric to compute.""" + dataflow_plan = dataflow_plan_builder.build_plan( + MetricFlowQuerySpec( + metric_specs=(MetricSpec(element_name="trailing_2_months_revenue"),), + dimension_specs=(), + time_dimension_specs=(), + ) + ) + + convert_and_check( + request=request, + mf_test_session_state=mf_test_session_state, + dataflow_to_sql_converter=dataflow_to_sql_converter, + sql_client=sql_client, + node=dataflow_plan.sink_output_nodes[0].parent_node, + ) + + +@pytest.mark.sql_engine_snapshot +def test_cumulative_metric_no_window( + request: FixtureRequest, + mf_test_session_state: MetricFlowTestSessionState, + dataflow_plan_builder: DataflowPlanBuilder, + dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, + consistent_id_object_repository: ConsistentIdObjectRepository, + sql_client: SqlClient, +) -> None: + """Tests converting a dataflow plan to a SQL query plan where there is a windowless cumulative metric to compute.""" + dataflow_plan = dataflow_plan_builder.build_plan( + MetricFlowQuerySpec( + metric_specs=(MetricSpec(element_name="revenue_all_time"),), + dimension_specs=(), + time_dimension_specs=( + TimeDimensionSpec( + element_name="ds", + entity_links=(), + time_granularity=TimeGranularity.MONTH, + ), + ), + ) + ) + + convert_and_check( + request=request, + mf_test_session_state=mf_test_session_state, + dataflow_to_sql_converter=dataflow_to_sql_converter, + sql_client=sql_client, + node=dataflow_plan.sink_output_nodes[0].parent_node, + ) + + +@pytest.mark.sql_engine_snapshot +def test_cumulative_metric_no_window_with_time_constraint( + request: FixtureRequest, + mf_test_session_state: MetricFlowTestSessionState, + dataflow_plan_builder: DataflowPlanBuilder, + dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, + consistent_id_object_repository: ConsistentIdObjectRepository, + sql_client: SqlClient, +) -> None: + """Tests converting a dataflow plan to a SQL query plan where there is a windowless cumulative metric to compute.""" + dataflow_plan = dataflow_plan_builder.build_plan( + MetricFlowQuerySpec( + metric_specs=(MetricSpec(element_name="revenue_all_time"),), + dimension_specs=(), + time_dimension_specs=( + TimeDimensionSpec( + element_name="ds", + entity_links=(), + time_granularity=TimeGranularity.MONTH, + ), + ), + time_range_constraint=TimeRangeConstraint( + start_time=as_datetime("2020-01-01"), end_time=as_datetime("2020-01-01") + ), + ) + ) + + convert_and_check( + request=request, + mf_test_session_state=mf_test_session_state, + dataflow_to_sql_converter=dataflow_to_sql_converter, + sql_client=sql_client, + node=dataflow_plan.sink_output_nodes[0].parent_node, + ) + + +@pytest.mark.sql_engine_snapshot +def test_cumulative_metric_grain_to_date( + request: FixtureRequest, + mf_test_session_state: MetricFlowTestSessionState, + dataflow_plan_builder: DataflowPlanBuilder, + dataflow_to_sql_converter: DataflowToSqlQueryPlanConverter, + consistent_id_object_repository: ConsistentIdObjectRepository, + sql_client: SqlClient, +) -> None: + """Tests converting a dataflow plan to a SQL query plan where grain_to_date cumulative metric to compute.""" + dataflow_plan = dataflow_plan_builder.build_plan( + MetricFlowQuerySpec( + metric_specs=(MetricSpec(element_name="revenue_mtd"),), + dimension_specs=(), + time_dimension_specs=( + TimeDimensionSpec( + element_name="ds", + entity_links=(), + time_granularity=TimeGranularity.MONTH, + ), + ), + ) + ) + + convert_and_check( + request=request, + mf_test_session_state=mf_test_session_state, + dataflow_to_sql_converter=dataflow_to_sql_converter, + sql_client=sql_client, + node=dataflow_plan.sink_output_nodes[0].parent_node, + ) diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql similarity index 100% rename from metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql rename to metricflow/test/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric__plan0.xml deleted file mode 100644 index 7e2773e0af..0000000000 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric__plan0.xml +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_grain_to_date__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_grain_to_date__plan0.xml deleted file mode 100644 index 9e80834f37..0000000000 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_grain_to_date__plan0.xml +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_ds__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_ds__plan0.xml deleted file mode 100644 index ef67de0f3d..0000000000 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_ds__plan0.xml +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window__plan0.xml deleted file mode 100644 index beaa84dd6d..0000000000 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window__plan0.xml +++ /dev/null @@ -1,311 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window_with_time_constraint__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window_with_time_constraint__plan0.xml deleted file mode 100644 index 326f716361..0000000000 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_no_window_with_time_constraint__plan0.xml +++ /dev/null @@ -1,462 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_with_time_constraint__plan0.xml b/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_with_time_constraint__plan0.xml deleted file mode 100644 index 445b8866af..0000000000 --- a/metricflow/test/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_cumulative_metric_with_time_constraint__plan0.xml +++ /dev/null @@ -1,462 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -