diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/MetricFlowQuerySpec/test_ambiguous_entity_path_resolves_to_shortest_entity_path_item__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/MetricFlowQuerySpec/test_ambiguous_entity_path_resolves_to_shortest_entity_path_item__result_0.txt index 02a490720d..a768075a1e 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/MetricFlowQuerySpec/test_ambiguous_entity_path_resolves_to_shortest_entity_path_item__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/MetricFlowQuerySpec/test_ambiguous_entity_path_resolves_to_shortest_entity_path_item__result_0.txt @@ -1,3 +1,8 @@ +test_name: test_ambiguous_entity_path_resolves_to_shortest_entity_path_item +test_filename: test_ambiguous_entity_path.py +docstring: + Tests that 'entity_1__country' resolves to 'entity_1__country' not 'entity_1__entity_0__country'. +--- MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='all_entity_metric', filter_spec_set=WhereFilterSpecSet()),), dimension_specs=(DimensionSpec(element_name='country', entity_links=(EntityReference(element_name='entity_1'),)),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/MetricFlowQuerySpec/test_resolvable_ambiguous_entity_path__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/MetricFlowQuerySpec/test_resolvable_ambiguous_entity_path__result_0.txt index 621d7f1a43..0a0ec05cf5 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/MetricFlowQuerySpec/test_resolvable_ambiguous_entity_path__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/MetricFlowQuerySpec/test_resolvable_ambiguous_entity_path__result_0.txt @@ -1,3 +1,6 @@ +test_name: test_resolvable_ambiguous_entity_path +test_filename: test_ambiguous_entity_path.py +--- MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='entity_1_metric', filter_spec_set=WhereFilterSpecSet()),), dimension_specs=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/str/test_non_resolvable_ambiguous_entity_path_due_to_mismatch__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/str/test_non_resolvable_ambiguous_entity_path_due_to_mismatch__result_0.txt index 3571c656a7..b0d108903b 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/str/test_non_resolvable_ambiguous_entity_path_due_to_mismatch__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/str/test_non_resolvable_ambiguous_entity_path_due_to_mismatch__result_0.txt @@ -1,3 +1,10 @@ +test_name: test_non_resolvable_ambiguous_entity_path_due_to_mismatch +test_filename: test_ambiguous_entity_path.py +docstring: + Tests an input with an ambiguous entity-path that can't be resolved due to a mismatch between metrics. + + 'entity_0__country' matches ['entity_1__entity_0__country', 'entity_0__country'] +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/str/test_non_resolvable_ambiguous_entity_path_due_to_multiple_matches__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/str/test_non_resolvable_ambiguous_entity_path_due_to_multiple_matches__result_0.txt index b3397a305a..07f8e58cc3 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/str/test_non_resolvable_ambiguous_entity_path_due_to_multiple_matches__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_ambiguous_entity_path.py/str/test_non_resolvable_ambiguous_entity_path_due_to_multiple_matches__result_0.txt @@ -1,3 +1,10 @@ +test_name: test_non_resolvable_ambiguous_entity_path_due_to_multiple_matches +test_filename: test_ambiguous_entity_path.py +docstring: + Tests an input with an ambiguous entity-path that can't be resolved due to multiple matches. + + 'entity_0__country' matches ['entity_1__entity_0__country', 'entity_2__entity_0__country'] +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__accumulate_last_2_months_metric__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__accumulate_last_2_months_metric__set0.txt index 6d8275d0c1..35c4a9423c 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__accumulate_last_2_months_metric__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__accumulate_last_2_months_metric__set0.txt @@ -1,3 +1,6 @@ +test_name: test_available_group_by_items[accumulate_last_2_months_metric] +test_filename: test_available_group_by_items.py +--- [ "TimeDimension('metric_time', 'month')", "TimeDimension('metric_time', 'quarter')", diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__derived_metric_with_different_parent_time_grains__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__derived_metric_with_different_parent_time_grains__set0.txt index 9fd4d24655..3926451fb7 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__derived_metric_with_different_parent_time_grains__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__derived_metric_with_different_parent_time_grains__set0.txt @@ -1 +1,4 @@ +test_name: test_available_group_by_items[derived_metric_with_different_parent_time_grains] +test_filename: test_available_group_by_items.py +--- ["TimeDimension('metric_time', 'year')", "TimeDimension('metric_time', 'year', date_part_name='year')"] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__derived_metric_with_same_parent_time_grains__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__derived_metric_with_same_parent_time_grains__set0.txt index bc04ca36c1..11a2bc5a5d 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__derived_metric_with_same_parent_time_grains__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__derived_metric_with_same_parent_time_grains__set0.txt @@ -1,3 +1,6 @@ +test_name: test_available_group_by_items[derived_metric_with_same_parent_time_grains] +test_filename: test_available_group_by_items.py +--- [ "TimeDimension('metric_time', 'month')", "TimeDimension('metric_time', 'month', date_part_name='month')", diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__metrics_with_different_time_grains__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__metrics_with_different_time_grains__set0.txt index 9fd4d24655..afb2e8c9da 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__metrics_with_different_time_grains__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__metrics_with_different_time_grains__set0.txt @@ -1 +1,4 @@ +test_name: test_available_group_by_items[metrics_with_different_time_grains] +test_filename: test_available_group_by_items.py +--- ["TimeDimension('metric_time', 'year')", "TimeDimension('metric_time', 'year', date_part_name='year')"] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__metrics_with_same_time_grains__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__metrics_with_same_time_grains__set0.txt index bc04ca36c1..fd951a0e0a 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__metrics_with_same_time_grains__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__metrics_with_same_time_grains__set0.txt @@ -1,3 +1,6 @@ +test_name: test_available_group_by_items[metrics_with_same_time_grains] +test_filename: test_available_group_by_items.py +--- [ "TimeDimension('metric_time', 'month')", "TimeDimension('metric_time', 'month', date_part_name='month')", diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__no_metrics__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__no_metrics__set0.txt index f6c44a8383..480ea2ffe8 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__no_metrics__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__no_metrics__set0.txt @@ -1,3 +1,6 @@ +test_name: test_available_group_by_items[no_metrics] +test_filename: test_available_group_by_items.py +--- [ "TimeDimension('metric_time', 'day')", "TimeDimension('metric_time', 'day', date_part_name='day')", diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__simple_metric__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__simple_metric__set0.txt index bc04ca36c1..31021f5030 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__simple_metric__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_available_group_by_items.py/LinkableSpecSet/test_available_group_by_items__simple_metric__set0.txt @@ -1,3 +1,6 @@ +test_name: test_available_group_by_items[simple_metric] +test_filename: test_available_group_by_items.py +--- [ "TimeDimension('metric_time', 'month')", "TimeDimension('metric_time', 'month', date_part_name='month')", diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_conversion_metrics.py/ParseQueryResult/test_conversion_rate_with_constant_properties__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_conversion_metrics.py/ParseQueryResult/test_conversion_rate_with_constant_properties__result.txt index 79b981a90d..3666868b77 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_conversion_metrics.py/ParseQueryResult/test_conversion_rate_with_constant_properties__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_conversion_metrics.py/ParseQueryResult/test_conversion_rate_with_constant_properties__result.txt @@ -1,3 +1,6 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics.py +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_dimension_lookup.py/dict/test_get_invariant__obj_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_dimension_lookup.py/dict/test_get_invariant__obj_0.txt index a0e7daa28f..720ed72b0f 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_dimension_lookup.py/dict/test_get_invariant__obj_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_dimension_lookup.py/dict/test_get_invariant__obj_0.txt @@ -1,3 +1,10 @@ +test_name: test_get_invariant +test_filename: test_dimension_lookup.py +docstring: + Test invariants for all dimensions. + + Uses `partitioned_multi_hop_join_semantic_manifest` to show an example of different `is_partition` values. +--- { 'account_month': DimensionInvariant(dimension_type=CATEGORICAL, is_partition=False), 'acquired_ds': DimensionInvariant(dimension_type=TIME, is_partition=False), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/list/test_linkable_element_set_as_spec_set__set0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/list/test_linkable_element_set_as_spec_set__set0.txt index 79711987c4..70f2bce7a6 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/list/test_linkable_element_set_as_spec_set__set0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/list/test_linkable_element_set_as_spec_set__set0.txt @@ -1,3 +1,12 @@ +test_name: test_linkable_element_set_as_spec_set +test_filename: test_linkable_spec_resolver.py +docstring: + Tests extracting linkable elements for a given measure input and converting them into a spec set. + + Note assert_spec_set_snapshot_equal relies on an InstanceSpecSet, not a LinkableSpecSet, so we have to + double up on the .as_spec_set calls here. Yes, this is lazy. No, I don't care to make another helper to + do snapshot comparisons on LinkableSpecSets. +--- [ 'listing', 'listing__active_listings', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt index ef8cd6e517..e6bbac32fb 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_all_properties__result0.txt @@ -1,3 +1,6 @@ +test_name: test_all_properties +test_filename: test_linkable_spec_resolver.py +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties --------------------------------------------------------- ------------------- -------------------- ------------------ ----------- ---------------------------------------------------------------- ('bookings_source',) () listing ['ENTITY', 'LOCAL'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path__result0.txt index 4f177353fe..22e2cd84bc 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path__result0.txt @@ -1,3 +1,6 @@ +test_name: test_create_linkable_element_set_from_join_path +test_filename: test_linkable_spec_resolver.py +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties -------------------------------------- -------------- --------------- ------------------ ----------- --------------------------------------------------- ('bookings_source', 'listings_latest') ('listing',) capacity_latest ['JOINED'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path_multi_hop__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path_multi_hop__result0.txt index d7235a54b4..00a908372b 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path_multi_hop__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_create_linkable_element_set_from_join_path_multi_hop__result0.txt @@ -1,3 +1,6 @@ +test_name: test_create_linkable_element_set_from_join_path_multi_hop +test_filename: test_linkable_spec_resolver.py +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties ------------------------------------------------------ -------------------- --------------- ------------------ ----------- ---------------------------------------------------------------- ('views_source', 'bookings_source', 'listings_latest') ('guest', 'listing') capacity_latest ['JOINED', 'MULTI_HOP'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt index 6818fc912d..5471e2dfde 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_cyclic_join_manifest__result0.txt @@ -1,3 +1,6 @@ +test_name: test_cyclic_join_manifest +test_filename: test_linkable_spec_resolver.py +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties --------------------------------------------- ------------------ --------------- ------------------ ----------- -------------------------------------------------------- ('listings_latest',) () cyclic_entity ['ENTITY', 'LOCAL'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_cumulative_metric__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_cumulative_metric__result0.txt index 7124f41bea..7283191768 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_cumulative_metric__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_cumulative_metric__result0.txt @@ -1,3 +1,6 @@ +test_name: test_metric_time_property_for_cumulative_metric +test_filename: test_linkable_spec_resolver.py +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties ----------------- -------------- ----------- ------------------ ----------- ------------------------------------------- ('revenue',) () metric_time day ['METRIC_TIME'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_derived_metrics__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_derived_metrics__result0.txt index 78444785ec..5caa046513 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_derived_metrics__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_metric_time_property_for_derived_metrics__result0.txt @@ -1,3 +1,6 @@ +test_name: test_metric_time_property_for_derived_metrics +test_filename: test_linkable_spec_resolver.py +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties -------------------- -------------- ----------- ------------------ ----------- -------------------------------------------------------- ('bookings_source',) () metric_time day ['METRIC_TIME'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_one_property__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_one_property__result0.txt index 77418e86cf..566714a9df 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_one_property__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_linkable_spec_resolver.py/str/test_one_property__result0.txt @@ -1,3 +1,6 @@ +test_name: test_one_property +test_filename: test_linkable_spec_resolver.py +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties -------------------- -------------- ------- ------------------ ----------- ------------------- ('bookings_source',) () listing ['ENTITY', 'LOCAL'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt index 1a85f227b6..1bec039383 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__accumulate_last_2_months_metric__result.txt @@ -1,3 +1,6 @@ +test_name: test_ambiguous_metric_time_in_query_filter[accumulate_last_2_months_metric] +test_filename: test_matching_item_for_filters.py +--- GroupByItemResolution( spec=TimeDimensionSpec( element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt index a6d94b9099..e51b17ea93 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_different_parent_time_grains__result.txt @@ -1,3 +1,6 @@ +test_name: test_ambiguous_metric_time_in_query_filter[derived_metric_with_different_parent_time_grains] +test_filename: test_matching_item_for_filters.py +--- GroupByItemResolution( spec=TimeDimensionSpec( element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt index 1a85f227b6..ebf3eb822a 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__derived_metric_with_same_parent_time_grains__result.txt @@ -1,3 +1,6 @@ +test_name: test_ambiguous_metric_time_in_query_filter[derived_metric_with_same_parent_time_grains] +test_filename: test_matching_item_for_filters.py +--- GroupByItemResolution( spec=TimeDimensionSpec( element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt index a6d94b9099..be431427ae 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_different_time_grains__result.txt @@ -1,3 +1,6 @@ +test_name: test_ambiguous_metric_time_in_query_filter[metrics_with_different_time_grains] +test_filename: test_matching_item_for_filters.py +--- GroupByItemResolution( spec=TimeDimensionSpec( element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt index 1a85f227b6..6a205fa444 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__metrics_with_same_time_grains__result.txt @@ -1,3 +1,6 @@ +test_name: test_ambiguous_metric_time_in_query_filter[metrics_with_same_time_grains] +test_filename: test_matching_item_for_filters.py +--- GroupByItemResolution( spec=TimeDimensionSpec( element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt index 49ed9dcd91..c923fa18ad 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__no_metrics__result.txt @@ -1,3 +1,6 @@ +test_name: test_ambiguous_metric_time_in_query_filter[no_metrics] +test_filename: test_matching_item_for_filters.py +--- GroupByItemResolution( spec=TimeDimensionSpec( element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt index 1a85f227b6..80918e67a9 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_filters.py/GroupByItemResolution/test_ambiguous_metric_time_in_query_filter__simple_metric__result.txt @@ -1,3 +1,6 @@ +test_name: test_ambiguous_metric_time_in_query_filter[simple_metric] +test_filename: test_matching_item_for_filters.py +--- GroupByItemResolution( spec=TimeDimensionSpec( element_name='metric_time', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/AvailableGroupByItemsResolution/test_missing_parent_for_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/AvailableGroupByItemsResolution/test_missing_parent_for_metric__result.txt index 9272f2d412..db9dc67bf2 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/AvailableGroupByItemsResolution/test_missing_parent_for_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/AvailableGroupByItemsResolution/test_missing_parent_for_metric__result.txt @@ -1,3 +1,13 @@ +test_name: test_missing_parent_for_metric +test_filename: test_matching_item_for_querying.py +docstring: + Tests a search for a group by item with a metric stub with no parents. + + We operate under the logical assumption that metric and query items have parent nodes - for a query, + these are the inputs (group by items, metrics, etc.). For metrics, these are the metric inputs (metrics + or measures). However, in the event of a validation gap upstream, we sometimes encounter inscrutable errors + caused by missing parent nodes for these input types, so we add a more informative error and test for it here. +--- AvailableGroupByItemsResolution( issue_set=MetricFlowQueryResolutionIssueSet( issues=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_invalid_group_by_item__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_invalid_group_by_item__result.txt index 21234f22f4..f0bc318159 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_invalid_group_by_item__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_invalid_group_by_item__result.txt @@ -1,3 +1,6 @@ +test_name: test_invalid_group_by_item +test_filename: test_matching_item_for_querying.py +--- GroupByItemResolution( linkable_element_set=LinkableElementSet(), issue_set=MetricFlowQueryResolutionIssueSet( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_unavailable_group_by_item_in_derived_metric_parent__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_unavailable_group_by_item_in_derived_metric_parent__result.txt index a3774cbe89..ed9b45a37c 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_unavailable_group_by_item_in_derived_metric_parent__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_matching_item_for_querying.py/GroupByItemResolution/test_unavailable_group_by_item_in_derived_metric_parent__result.txt @@ -1,3 +1,8 @@ +test_name: test_unavailable_group_by_item_in_derived_metric_parent +test_filename: test_matching_item_for_querying.py +docstring: + Tests a group-by-item that's only available in one of the parent metrics of a derived metric. +--- GroupByItemResolution( linkable_element_set=LinkableElementSet(), issue_set=MetricFlowQueryResolutionIssueSet( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_measure_lookup.py/dict/test_measure_properties__obj_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_measure_lookup.py/dict/test_measure_properties__obj_0.txt index f21472ac7d..7a73798dd9 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_measure_lookup.py/dict/test_measure_properties__obj_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_measure_lookup.py/dict/test_measure_properties__obj_0.txt @@ -1,3 +1,8 @@ +test_name: test_measure_properties +test_filename: test_measure_lookup.py +docstring: + Test a couple of measures for correct properties. +--- { 'bookings': MeasureRelationshipPropertySet( model_reference=SemanticModelReference(semantic_model_name='extended_bookings_source'), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_defined_metric_time_filter__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_defined_metric_time_filter__result_0.txt index c0a5ff91dc..9dc9a1a5d3 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_defined_metric_time_filter__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_defined_metric_time_filter__result_0.txt @@ -1,3 +1,8 @@ +test_name: test_derived_metric_with_defined_metric_time_filter +test_filename: test_metric_time_granularity.py +docstring: + Tests that a derived metric's metric_time filter defined in its YAML uses outer metric's default granularity. +--- MetricFlowQuerySpec( metric_specs=( MetricSpec( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_defined_metric_time_filter_on_input_metric__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_defined_metric_time_filter_on_input_metric__result_0.txt index 9a7182e743..9f723ba69f 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_defined_metric_time_filter_on_input_metric__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_defined_metric_time_filter_on_input_metric__result_0.txt @@ -1,3 +1,11 @@ +test_name: test_derived_metric_with_defined_metric_time_filter_on_input_metric +test_filename: test_metric_time_granularity.py +docstring: + Tests a derived metric with a metric_time filter on its input metric. + + Should use the outer metric's default granularity. + Should always use the default granularity for the object where the filter is defined. +--- MetricFlowQuerySpec( metric_specs=( MetricSpec( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_explicit_time_granularity__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_explicit_time_granularity__result_0.txt index fd25d23aa1..89c220d692 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_explicit_time_granularity__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_with_explicit_time_granularity__result_0.txt @@ -1,3 +1,8 @@ +test_name: test_derived_metric_with_explicit_time_granularity +test_filename: test_metric_time_granularity.py +docstring: + Tests that a derived metric with default granularity ignores the default granularities set on its input metrics. +--- MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='derived_metric_with_time_granularity', filter_spec_set=WhereFilterSpecSet()),), time_dimension_specs=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_without_explicit_time_granularity__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_without_explicit_time_granularity__result_0.txt index c92027c4bc..dfef7bef18 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_without_explicit_time_granularity__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_derived_metric_without_explicit_time_granularity__result_0.txt @@ -1,3 +1,10 @@ +test_name: test_derived_metric_without_explicit_time_granularity +test_filename: test_metric_time_granularity.py +docstring: + Tests a derived metric without explicit default granularity. + + Should ignore the default granularities set on its input metrics. +--- MetricFlowQuerySpec( metric_specs=( MetricSpec( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_non_metric_time_ignores_default_granularity__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_non_metric_time_ignores_default_granularity__result_0.txt index 4672054bd0..b8a7d574a5 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_non_metric_time_ignores_default_granularity__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_non_metric_time_ignores_default_granularity__result_0.txt @@ -1,3 +1,6 @@ +test_name: test_non_metric_time_ignores_default_granularity +test_filename: test_metric_time_granularity.py +--- MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='largest_listing', filter_spec_set=WhereFilterSpecSet()),), time_dimension_specs=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_with_defined_metric_time_filter__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_with_defined_metric_time_filter__result_0.txt index 077142a05a..797e834bb5 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_with_defined_metric_time_filter__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_with_defined_metric_time_filter__result_0.txt @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_defined_metric_time_filter +test_filename: test_metric_time_granularity.py +docstring: + Tests that a simple metric's metric_time filter defined in its YAML uses metric's default granularity. +--- MetricFlowQuerySpec( metric_specs=( MetricSpec( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_with_explicit_time_granularity__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_with_explicit_time_granularity__result_0.txt index 663138786e..d40c6b5028 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_with_explicit_time_granularity__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_with_explicit_time_granularity__result_0.txt @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_explicit_time_granularity +test_filename: test_metric_time_granularity.py +--- MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='largest_listing', filter_spec_set=WhereFilterSpecSet()),), time_dimension_specs=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_without_explicit_time_granularity__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_without_explicit_time_granularity__result_0.txt index 9b7b10399c..f77d58a58d 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_without_explicit_time_granularity__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_metric_time_granularity.py/MetricFlowQuerySpec/test_simple_metric_without_explicit_time_granularity__result_0.txt @@ -1,3 +1,8 @@ +test_name: test_simple_metric_without_explicit_time_granularity +test_filename: test_metric_time_granularity.py +docstring: + Tests that a metric without default granularity uses the min granualrity for its agg_time_dim. +--- MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='monthly_metric_0', filter_spec_set=WhereFilterSpecSet()),), time_dimension_specs=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_cumulative_metric_agg_time_dimension_name_validation__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_cumulative_metric_agg_time_dimension_name_validation__result.txt index a9e169caa3..7c75b11451 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_cumulative_metric_agg_time_dimension_name_validation__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_cumulative_metric_agg_time_dimension_name_validation__result.txt @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_agg_time_dimension_name_validation +test_filename: test_query_parser.py +docstring: + Test that queries for cumulative metrics succeed if the agg_time_dimension is selected by name. +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='revenue_cumulative', filter_spec_set=WhereFilterSpecSet()),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_derived_metric_with_offset_parsing__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_derived_metric_with_offset_parsing__result.txt index 67c2e3cc2a..1b45a760ad 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_derived_metric_with_offset_parsing__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_derived_metric_with_offset_parsing__result.txt @@ -1,3 +1,8 @@ +test_name: test_derived_metric_with_offset_parsing +test_filename: test_query_parser.py +docstring: + Test that querying derived metrics with a time offset requires a time dimension. +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='revenue_growth_2_weeks', filter_spec_set=WhereFilterSpecSet()),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_order_by_granularity_conversion__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_order_by_granularity_conversion__result.txt index 6b4bc38888..70441d598a 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_order_by_granularity_conversion__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_order_by_granularity_conversion__result.txt @@ -1,3 +1,11 @@ +test_name: test_order_by_granularity_conversion +test_filename: test_query_parser.py +docstring: + Test that the granularity of the primary time dimension in the order by is returned appropriately. + + In the case where the primary time dimension is specified in the order by without a granularity suffix, the order + by spec returned by the parser should have a granularity appropriate for the queried metrics. +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_order_by_granularity_no_conversion__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_order_by_granularity_no_conversion__result.txt index 659b8ae592..d06e327745 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_order_by_granularity_no_conversion__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_order_by_granularity_no_conversion__result.txt @@ -1,3 +1,6 @@ +test_name: test_order_by_granularity_no_conversion +test_filename: test_query_parser.py +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='bookings', filter_spec_set=WhereFilterSpecSet()),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt index f275d1d490..001db2de65 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_parse_and_validate_where_constraint_dims__result.txt @@ -1,3 +1,8 @@ +test_name: test_parse_and_validate_where_constraint_dims +test_filename: test_query_parser.py +docstring: + Test that the returned time constraint in the query spec is adjusted to match the granularity of the query. +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='bookings', filter_spec_set=WhereFilterSpecSet()),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser__result.txt index b20696dc79..1ec9babe62 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser__result.txt @@ -1,3 +1,6 @@ +test_name: test_query_parser +test_filename: test_query_parser.py +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='bookings', filter_spec_set=WhereFilterSpecSet()),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_case_insensitivity_with_names__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_case_insensitivity_with_names__result.txt index b20696dc79..0a96b18d3d 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_case_insensitivity_with_names__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_case_insensitivity_with_names__result.txt @@ -1,3 +1,6 @@ +test_name: test_query_parser_case_insensitivity_with_names +test_filename: test_query_parser.py +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='bookings', filter_spec_set=WhereFilterSpecSet()),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_case_insensitivity_with_parameter_objects__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_case_insensitivity_with_parameter_objects__result.txt index b20696dc79..aa3f0b80aa 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_case_insensitivity_with_parameter_objects__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_case_insensitivity_with_parameter_objects__result.txt @@ -1,3 +1,6 @@ +test_name: test_query_parser_case_insensitivity_with_parameter_objects +test_filename: test_query_parser.py +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='bookings', filter_spec_set=WhereFilterSpecSet()),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_with_object_params__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_with_object_params__result.txt index b20696dc79..c6f642d128 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_with_object_params__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_query_parser_with_object_params__result.txt @@ -1,3 +1,6 @@ +test_name: test_query_parser_with_object_params +test_filename: test_query_parser.py +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=(MetricSpec(element_name='bookings', filter_spec_set=WhereFilterSpecSet()),), diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_time_range_constraint_conversion__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_time_range_constraint_conversion__result.txt index 7d0bb5bcee..8c52a3eb07 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_time_range_constraint_conversion__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/ParseQueryResult/test_time_range_constraint_conversion__result.txt @@ -1,3 +1,8 @@ +test_name: test_time_range_constraint_conversion +test_filename: test_query_parser.py +docstring: + Test that the returned time constraint in the query spec is adjusted to match the granularity of the query. +--- ParseQueryResult( query_spec=MetricFlowQuerySpec( metric_specs=( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/str/test_join_through_scd_no_time_dimension_validation__error.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/str/test_join_through_scd_no_time_dimension_validation__error.txt index 9479840b37..4fe1d3d7d9 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/str/test_join_through_scd_no_time_dimension_validation__error.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/str/test_join_through_scd_no_time_dimension_validation__error.txt @@ -1,3 +1,8 @@ +test_name: test_join_through_scd_no_time_dimension_validation +test_filename: test_query_parser.py +docstring: + Test that queries that join through SCDs semantic models fail if no time dimensions are selected. +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/str/test_join_to_scd_no_time_dimension_validation__error.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/str/test_join_to_scd_no_time_dimension_validation__error.txt index f1c4b42350..5e1530d7c6 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/str/test_join_to_scd_no_time_dimension_validation__error.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_query_parser.py/str/test_join_to_scd_no_time_dimension_validation__error.txt @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_no_time_dimension_validation +test_filename: test_query_parser.py +docstring: + Test that queries that join to SCD semantic models fail if no time dimensions are selected. +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__accumulate_last_2_months_metric__gbir_6.xml b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__accumulate_last_2_months_metric__gbir_6.xml index f1c15f11df..8c261505f9 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__accumulate_last_2_months_metric__gbir_6.xml +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__accumulate_last_2_months_metric__gbir_6.xml @@ -1,3 +1,8 @@ +test_name: test_snapshot[accumulate_last_2_months_metric] +test_filename: test_resolution_dags.py +docstring: + Checks that the resolution DAGs have been built correctly via checks against a snapshot. +--- diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__derived_metric_with_different_parent_time_grains__gbir_5.xml b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__derived_metric_with_different_parent_time_grains__gbir_5.xml index 231a3477b1..11da0c5442 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__derived_metric_with_different_parent_time_grains__gbir_5.xml +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__derived_metric_with_different_parent_time_grains__gbir_5.xml @@ -1,3 +1,8 @@ +test_name: test_snapshot[derived_metric_with_different_parent_time_grains] +test_filename: test_resolution_dags.py +docstring: + Checks that the resolution DAGs have been built correctly via checks against a snapshot. +--- diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__derived_metric_with_same_parent_time_grains__gbir_4.xml b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__derived_metric_with_same_parent_time_grains__gbir_4.xml index dbb034caea..33ef8c315c 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__derived_metric_with_same_parent_time_grains__gbir_4.xml +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__derived_metric_with_same_parent_time_grains__gbir_4.xml @@ -1,3 +1,8 @@ +test_name: test_snapshot[derived_metric_with_same_parent_time_grains] +test_filename: test_resolution_dags.py +docstring: + Checks that the resolution DAGs have been built correctly via checks against a snapshot. +--- diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_different_time_grains__gbir_3.xml b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_different_time_grains__gbir_3.xml index f84a7c9242..550302c135 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_different_time_grains__gbir_3.xml +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_different_time_grains__gbir_3.xml @@ -1,3 +1,8 @@ +test_name: test_snapshot[metrics_with_different_time_grains] +test_filename: test_resolution_dags.py +docstring: + Checks that the resolution DAGs have been built correctly via checks against a snapshot. +--- diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_same_time_grains__gbir_2.xml b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_same_time_grains__gbir_2.xml index 411ed69ec9..caa4142785 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_same_time_grains__gbir_2.xml +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__metrics_with_same_time_grains__gbir_2.xml @@ -1,3 +1,8 @@ +test_name: test_snapshot[metrics_with_same_time_grains] +test_filename: test_resolution_dags.py +docstring: + Checks that the resolution DAGs have been built correctly via checks against a snapshot. +--- diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__no_metrics__gbir_0.xml b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__no_metrics__gbir_0.xml index 1e97ef077e..ac396f296a 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__no_metrics__gbir_0.xml +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__no_metrics__gbir_0.xml @@ -1,3 +1,8 @@ +test_name: test_snapshot[no_metrics] +test_filename: test_resolution_dags.py +docstring: + Checks that the resolution DAGs have been built correctly via checks against a snapshot. +--- diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__simple_metric__gbir_1.xml b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__simple_metric__gbir_1.xml index e3007d92c9..3afcf6a4ba 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__simple_metric__gbir_1.xml +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_resolution_dags.py/GroupByItemResolutionDag/test_snapshot__simple_metric__gbir_1.xml @@ -1,3 +1,8 @@ +test_name: test_snapshot[simple_metric] +test_filename: test_resolution_dags.py +docstring: + Checks that the resolution DAGs have been built correctly via checks against a snapshot. +--- diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt index c579380471..665c68f6f2 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/dict/test_get_names__result0.txt @@ -1,3 +1,6 @@ +test_name: test_get_names +test_filename: test_semantic_model_container.py +--- { 'dimension_references': [ 'account_type', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure__result0.txt index 3a46959d6e..8e5c9d1b26 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure__result0.txt @@ -1,3 +1,8 @@ +test_name: test_linkable_elements_for_measure +test_filename: test_semantic_model_container.py +docstring: + Tests extracting linkable elements for a given measure input. +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties ------------------------------------------ --------------------------------------------- --------------------------------------------------- ------------------ ----------- -------------------------------------------------------- ('listings_latest',) () listing ['ENTITY', 'LOCAL'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure_multi_hop_model__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure_multi_hop_model__result0.txt index 4f8ac097b1..0b97217603 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure_multi_hop_model__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_measure_multi_hop_model__result0.txt @@ -1,3 +1,8 @@ +test_name: test_linkable_elements_for_measure_multi_hop_model +test_filename: test_semantic_model_container.py +docstring: + Tests extracting linkable elements for a given measure input. +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties ------------------------------------------------------------- -------------------------------------- ---------------------- ------------------ ----------- -------------------------------------------------------- ('account_month_txns',) () account_id ['ENTITY', 'LOCAL'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_metrics__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_metrics__result0.txt index 86f89a1f84..ae15d94f1d 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_metrics__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_elements_for_metrics__result0.txt @@ -1,3 +1,6 @@ +test_name: test_linkable_elements_for_metrics +test_filename: test_semantic_model_container.py +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties ------------------------------------------------------ ------------------- -------------------- ------------------ ----------- ------------------------------------ ('views_source',) () listing ['ENTITY', 'LOCAL'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt index a4e1f08fd2..e6c2e43ebf 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/str/test_linkable_set_for_common_dimensions_in_different_models__result0.txt @@ -1,3 +1,10 @@ +test_name: test_linkable_set_for_common_dimensions_in_different_models +test_filename: test_semantic_model_container.py +docstring: + Tests case where a metric has dimensions with the same path. + + In this example, "ds" is defined in both "bookings_source" and "views_source". +--- Model Join-Path Entity Links Name Time Granularity Date Part Properties --------------------------------------------------------- ------------------- -------------------- ------------------ ----------- ------------------------------------ ('bookings_source',) () listing ['ENTITY', 'LOCAL'] diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_linkable_elements_for_no_metrics_query__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_linkable_elements_for_no_metrics_query__result0.txt index a6ef242107..8d20adbe75 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_linkable_elements_for_no_metrics_query__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_linkable_elements_for_no_metrics_query__result0.txt @@ -1,3 +1,8 @@ +test_name: test_linkable_elements_for_no_metrics_query +test_filename: test_semantic_model_container.py +docstring: + Tests extracting linkable elements for a dimension values query with no metrics. +--- ( 'account__account_type', 'account__ds__day', diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_local_linked_elements_for_metric__result0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_local_linked_elements_for_metric__result0.txt index 6a452c185a..351487b779 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_local_linked_elements_for_metric__result0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_semantic_model_container.py/tuple/test_local_linked_elements_for_metric__result0.txt @@ -1 +1,4 @@ +test_name: test_local_linked_elements_for_metric +test_filename: test_semantic_model_container.py +--- () diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt index a338d53584..839676e336 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_derived_metrics_with_common_filtered_metric__result.txt @@ -1,3 +1,10 @@ +test_name: test_filter_resolution_for_derived_metrics_with_common_filtered_metric +test_filename: test_spec_lookup.py +docstring: + Checks that there are 2 filter spec resolutions even if the metric + filter combination is repeated. + + The resolutions will have a different filter_location_path. +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt index 814d0b4b4c..46a9fa1f16 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_filter__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_resolution_for_invalid_metric_filter +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt index 023526cb23..1a5bd39c60 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_invalid_metric_input_filter__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_resolution_for_invalid_metric_input_filter +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt index 5d5dd54fd7..3454083665 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_filter__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_resolution_for_valid_metric_filter +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt index 5948e80f30..308995b06e 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_resolution_for_valid_metric_input_filter__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_resolution_for_valid_metric_input_filter +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt index 6d3b86f8b0..31d4c89e6a 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__accumulate_last_2_months_metric__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_spec_resolution[accumulate_last_2_months_metric] +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt index e5ac76a1cd..217d51ca7b 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_different_parent_time_grains__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_spec_resolution[derived_metric_with_different_parent_time_grains] +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt index 8f83ab08bc..c76f6bfced 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__derived_metric_with_same_parent_time_grains__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_spec_resolution[derived_metric_with_same_parent_time_grains] +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt index f833af58e0..6428a20047 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_different_time_grains__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_spec_resolution[metrics_with_different_time_grains] +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt index bcae0cf9e6..6ab013fa68 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__metrics_with_same_time_grains__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_spec_resolution[metrics_with_same_time_grains] +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__no_metrics__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__no_metrics__result.txt index 94bf6e8bb4..db6ebc70ae 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__no_metrics__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__no_metrics__result.txt @@ -1 +1,4 @@ +test_name: test_filter_spec_resolution[no_metrics] +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp() diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt index f508579985..4fc159012b 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_spec_lookup.py/str/test_filter_spec_resolution__simple_metric__result.txt @@ -1,3 +1,6 @@ +test_name: test_filter_spec_resolution[simple_metric] +test_filename: test_spec_lookup.py +--- FilterSpecResolutionLookUp( spec_resolutions=( FilterSpecResolution( diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_filters_in_multi_metric_query__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_filters_in_multi_metric_query__result_0.txt index 8d6db7c744..b72df520de 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_filters_in_multi_metric_query__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_filters_in_multi_metric_query__result_0.txt @@ -1,3 +1,8 @@ +test_name: test_suggestions_for_defined_filters_in_multi_metric_query +test_filename: test_suggestions.py +docstring: + Tests that the suggestions for invalid items in filters are specific to the metric. +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_where_filter__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_where_filter__result_0.txt index ae82301f75..d64d6f3591 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_where_filter__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_defined_where_filter__result_0.txt @@ -1,3 +1,6 @@ +test_name: test_suggestions_for_defined_where_filter +test_filename: test_suggestions.py +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_group_by_item__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_group_by_item__result_0.txt index 110404c060..2d83c55877 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_group_by_item__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_group_by_item__result_0.txt @@ -1,3 +1,6 @@ +test_name: test_suggestions_for_group_by_item +test_filename: test_suggestions.py +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_metric__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_metric__result_0.txt index 3455c5270e..9287ff7d22 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_metric__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_metric__result_0.txt @@ -1,3 +1,6 @@ +test_name: test_suggestions_for_metric +test_filename: test_suggestions.py +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_multiple_metrics__result_0.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_multiple_metrics__result_0.txt index 727cec2b57..bcd44b33c7 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_multiple_metrics__result_0.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_suggestions.py/str/test_suggestions_for_multiple_metrics__result_0.txt @@ -1,3 +1,6 @@ +test_name: test_suggestions_for_multiple_metrics +test_filename: test_suggestions.py +--- Got errors while resolving the query. Error #1: diff --git a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_time_adjuster.py/str/test_start_and_end_periods__results.txt b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_time_adjuster.py/str/test_start_and_end_periods__results.txt index 4a6879c541..0765a5f6a7 100644 --- a/metricflow-semantics/tests_metricflow_semantics/snapshots/test_time_adjuster.py/str/test_start_and_end_periods__results.txt +++ b/metricflow-semantics/tests_metricflow_semantics/snapshots/test_time_adjuster.py/str/test_start_and_end_periods__results.txt @@ -1,3 +1,6 @@ +test_name: test_start_and_end_periods +test_filename: test_time_adjuster.py +--- Date Grain Period Start Period End ------------------- ------- ------------------- ------------------- 2000-01-01T00:00:00 DAY 2000-01-01T00:00:00 2000-01-01T00:00:00 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt index 0f30ef0efd..dbb69a4fe1 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt index 3293139487..228f259ccb 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_cumulative_metric +test_filename: test_cli.py +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt index 01b1c56e28..246959c21c 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_limit__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_limit +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt index c5cd7d3f3e..cc8f869e80 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/BigQuery/test_saved_query_with_where__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_where +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt index 0f30ef0efd..dbb69a4fe1 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt index 3293139487..228f259ccb 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_cumulative_metric +test_filename: test_cli.py +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt index 01b1c56e28..246959c21c 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_limit__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_limit +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt index c5cd7d3f3e..cc8f869e80 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Databricks/test_saved_query_with_where__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_where +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt index 0f30ef0efd..dbb69a4fe1 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt index 3293139487..228f259ccb 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_cumulative_metric +test_filename: test_cli.py +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt index 01b1c56e28..246959c21c 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_limit__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_limit +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt index c5cd7d3f3e..cc8f869e80 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/DuckDB/test_saved_query_with_where__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_where +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt index 0f30ef0efd..dbb69a4fe1 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt index 3293139487..228f259ccb 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_cumulative_metric +test_filename: test_cli.py +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt index 01b1c56e28..246959c21c 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_limit__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_limit +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt index c5cd7d3f3e..cc8f869e80 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Postgres/test_saved_query_with_where__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_where +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt index 0f30ef0efd..dbb69a4fe1 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt index 3293139487..228f259ccb 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_cumulative_metric +test_filename: test_cli.py +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt index 01b1c56e28..246959c21c 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_limit__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_limit +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt index c5cd7d3f3e..cc8f869e80 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Redshift/test_saved_query_with_where__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_where +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt index 87ea93583d..d1c305a104 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query +test_filename: test_cli.py +--- METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt index e32120ace0..5dd9ae0c7f 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_cumulative_metric +test_filename: test_cli.py +--- METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE ------------------- --------------------------- 2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt index 1227379dab..b8a736370c 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_limit__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_limit +test_filename: test_cli.py +--- METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt index 846ae9bae4..4eef492a4b 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Snowflake/test_saved_query_with_where__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_where +test_filename: test_cli.py +--- METRIC_TIME__DAY LISTING__CAPACITY_LATEST BOOKINGS INSTANT_BOOKINGS ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt index 0f30ef0efd..dbb69a4fe1 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt index 3293139487..228f259ccb 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_cumulative_metric__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_cumulative_metric +test_filename: test_cli.py +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-01-01T00:00:00 1000 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt index 01b1c56e28..246959c21c 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_limit__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_limit +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt index c5cd7d3f3e..cc8f869e80 100644 --- a/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt +++ b/tests_metricflow/snapshots/test_cli.py/str/Trino/test_saved_query_with_where__cli_output.txt @@ -1,3 +1,6 @@ +test_name: test_saved_query_with_where +test_filename: test_cli.py +--- metric_time__day listing__capacity_latest bookings instant_bookings ------------------- -------------------------- ---------- ------------------ 2019-12-01T00:00:00 5 1 0 diff --git a/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_filter_combination__dfpo_0.xml b/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_filter_combination__dfpo_0.xml index be089a9574..8b8684f1ff 100644 --- a/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_filter_combination__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_filter_combination__dfpo_0.xml @@ -1,3 +1,8 @@ +test_name: test_filter_combination +test_filename: test_cm_branch_combiner.py +docstring: + Tests combining a single node. +--- diff --git a/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_read_sql_source_combination__dfpo_0.xml b/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_read_sql_source_combination__dfpo_0.xml index d2271abfc4..4ac943b011 100644 --- a/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_read_sql_source_combination__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_cm_branch_combiner.py/DataflowPlan/test_read_sql_source_combination__dfpo_0.xml @@ -1,3 +1,8 @@ +test_name: test_read_sql_source_combination +test_filename: test_cm_branch_combiner.py +docstring: + Tests combining a single node. +--- diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_if_in_where__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_if_in_where__after_pruning.sql index feb902d01b..90542886df 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_if_in_where__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_if_in_where__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_dont_prune_if_in_where +test_filename: test_column_pruner.py +docstring: + Tests that columns aren't pruned from parent sources if columns are used in a where. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_if_in_where__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_if_in_where__before_pruning.sql index 4628633787..bc1890d7c4 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_if_in_where__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_if_in_where__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_dont_prune_if_in_where +test_filename: test_column_pruner.py +docstring: + Tests that columns aren't pruned from parent sources if columns are used in a where. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_with_str_expr__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_with_str_expr__after_pruning.sql index 28659d557f..4279759519 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_with_str_expr__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_with_str_expr__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_dont_prune_with_str_expr +test_filename: test_column_pruner.py +docstring: + Tests that columns aren't pruned from parent sources if there's a string expression in the select. +--- -- test0 SELECT from_source.col0 AS some_string_expr diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_with_str_expr__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_with_str_expr__before_pruning.sql index 28659d557f..4279759519 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_with_str_expr__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_dont_prune_with_str_expr__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_dont_prune_with_str_expr +test_filename: test_column_pruner.py +docstring: + Tests that columns aren't pruned from parent sources if there's a string expression in the select. +--- -- test0 SELECT from_source.col0 AS some_string_expr diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_no_pruning__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_no_pruning__after_pruning.sql index 87bc81feac..f95bbed044 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_no_pruning__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_no_pruning__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_no_pruning +test_filename: test_column_pruner.py +docstring: + Tests a case where no pruning should occur. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_no_pruning__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_no_pruning__before_pruning.sql index 87bc81feac..f95bbed044 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_no_pruning__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_no_pruning__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_no_pruning +test_filename: test_column_pruner.py +docstring: + Tests a case where no pruning should occur. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_distinct_select__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_distinct_select__after_pruning.sql index 9acdadd458..211564846d 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_distinct_select__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_distinct_select__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_distinct_select +test_filename: test_column_pruner.py +docstring: + Test that distinct select node shouldn't be pruned. +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_distinct_select__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_distinct_select__before_pruning.sql index 9acdadd458..211564846d 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_distinct_select__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_distinct_select__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_distinct_select +test_filename: test_column_pruner.py +docstring: + Test that distinct select node shouldn't be pruned. +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_from_source__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_from_source__after_pruning.sql index 47fbbcd56e..c8bd3e7815 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_from_source__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_from_source__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_from_source +test_filename: test_column_pruner.py +docstring: + Tests a case where columns should be pruned from the FROM clause. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_from_source__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_from_source__before_pruning.sql index 37fdbd8728..d1bae83b95 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_from_source__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_from_source__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_from_source +test_filename: test_column_pruner.py +docstring: + Tests a case where columns should be pruned from the FROM clause. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents__after_pruning.sql index ef909a98d1..9abff3cffa 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_grandparents +test_filename: test_column_pruner.py +docstring: + Tests a case where a string expr in a node prevents the parent from being pruned, but prunes grandparents. +--- -- src2 SELECT col0 AS col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents__before_pruning.sql index 723ccddecc..8223c11346 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_grandparents +test_filename: test_column_pruner.py +docstring: + Tests a case where a string expr in a node prevents the parent from being pruned, but prunes grandparents. +--- -- src2 SELECT col0 AS col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents_in_join_query__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents_in_join_query__after_pruning.sql index 084b769589..306ea06ed2 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents_in_join_query__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents_in_join_query__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_grandparents_in_join_query +test_filename: test_column_pruner.py +docstring: + Tests pruning grandparents of a join query. +--- -- 4 SELECT col0 AS col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents_in_join_query__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents_in_join_query__before_pruning.sql index ec25fc0726..19fe2c150d 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents_in_join_query__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_grandparents_in_join_query__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_grandparents_in_join_query +test_filename: test_column_pruner.py +docstring: + Tests pruning grandparents of a join query. +--- -- 4 SELECT col0 AS col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_joined_source__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_joined_source__after_pruning.sql index 17125e8f4e..e61cfe21ed 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_joined_source__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_joined_source__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_joined_source +test_filename: test_column_pruner.py +docstring: + Tests a case where columns should be pruned from the JOIN clause. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_joined_source__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_joined_source__before_pruning.sql index d7ef1cdc46..a3d527c5a3 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_joined_source__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_joined_source__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_joined_source +test_filename: test_column_pruner.py +docstring: + Tests a case where columns should be pruned from the JOIN clause. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_str_expr__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_str_expr__after_pruning.sql index c696c74d0b..8203bbb498 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_str_expr__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_str_expr__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_str_expr +test_filename: test_column_pruner.py +docstring: + Tests a case where a string expr in a node results in the parent being pruned properly. +--- -- test0 SELECT col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_str_expr__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_str_expr__before_pruning.sql index ff85ef8a61..39c5b93589 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_str_expr__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_str_expr__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_str_expr +test_filename: test_column_pruner.py +docstring: + Tests a case where a string expr in a node results in the parent being pruned properly. +--- -- test0 SELECT col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_with_str_expr__after_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_with_str_expr__after_pruning.sql index b3cb165e56..ae6503081a 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_with_str_expr__after_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_with_str_expr__after_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_with_str_expr +test_filename: test_column_pruner.py +docstring: + Tests that columns are from parent sources if there's a string expression in the select with known cols. +--- -- test0 SELECT from_source.col0 AS some_string_expr diff --git a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_with_str_expr__before_pruning.sql b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_with_str_expr__before_pruning.sql index 28659d557f..d8bb53910f 100644 --- a/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_with_str_expr__before_pruning.sql +++ b/tests_metricflow/snapshots/test_column_pruner.py/SqlQueryPlan/test_prune_with_str_expr__before_pruning.sql @@ -1,3 +1,8 @@ +test_name: test_prune_with_str_expr +test_filename: test_column_pruner.py +docstring: + Tests that columns are from parent sources if there's a string expression in the select with known cols. +--- -- test0 SELECT from_source.col0 AS some_string_expr diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric__plan0.sql index 71afd70c29..f8ae8c5c12 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric__plan0_optimized.sql index 46f4788fed..664437ce83 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_categorical_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_categorical_filter__plan0.sql index 57643a5173..857433f164 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_categorical_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_categorical_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_categorical_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_categorical_filter__plan0_optimized.sql index cf28a553fe..bea04fdbf5 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_categorical_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_categorical_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_different_time_dimension_grains__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_different_time_dimension_grains__plan0.sql index a109954821..4e6508f45e 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_different_time_dimension_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_different_time_dimension_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys_month AS FLOAT64) / CAST(NULLIF(subq_14.visits, 0) AS FLOAT64) AS visit_buy_conversion_rate_with_monthly_conversion diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql index 9696c4fcb5..bcc5cf318c 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter__plan0.sql index 1d18ac9b38..81b504bc6f 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_16.buys AS FLOAT64) / CAST(NULLIF(subq_16.visits, 0) AS FLOAT64) AS visit_buy_conversion_rate diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter__plan0_optimized.sql index 3393b03c17..f76809ae3f 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter_not_in_group_by__plan0.sql index 2e35d6c3f6..ef25fb8796 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql index 99fe8a537c..a43c33f27f 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_time_constraint__plan0.sql index 4009c68530..9b7dcbf97d 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_time_constraint__plan0_optimized.sql index c4ecca9044..1c6647bda5 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window__plan0.sql index c29b146cf0..28939c6cd8 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window__plan0_optimized.sql index 9fed053a9c..07802da666 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window_and_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window_and_time_constraint__plan0.sql index e5d0cc740f..c7c9942b69 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window_and_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window_and_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql index 42a7790086..774c784b20 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric__plan0.sql index dba4d843e0..e6308b1fb8 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric__plan0_optimized.sql index 9e93193c3e..4ab162d3a7 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_categorical_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_categorical_filter__plan0.sql index 1a7efd93c2..288f0249fb 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_categorical_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_categorical_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_categorical_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_categorical_filter__plan0_optimized.sql index 40fb87b79a..7b89cf97ad 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_categorical_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_categorical_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_different_time_dimension_grains__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_different_time_dimension_grains__plan0.sql index 861f8b507b..ce4f3725ee 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_different_time_dimension_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_different_time_dimension_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys_month AS DOUBLE) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_with_monthly_conversion diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql index 72ef3695a7..f51940b03e 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter__plan0.sql index 2c8dfb4622..28c19e3aea 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_16.buys AS DOUBLE) / CAST(NULLIF(subq_16.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter__plan0_optimized.sql index 6edcac7975..c61d2124df 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter_not_in_group_by__plan0.sql index 56e7a55442..16224a446f 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql index 1e540c2689..5dc5f373e9 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_time_constraint__plan0.sql index edbf9c54a0..64ef7c6342 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_time_constraint__plan0_optimized.sql index 985f0a99e9..3a67233df6 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window__plan0.sql index 86aa0b350b..6048f6f98a 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window__plan0_optimized.sql index 1302b3d040..60948b7c54 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window_and_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window_and_time_constraint__plan0.sql index 5893a4e610..5c519347f1 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window_and_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window_and_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql index eba30fadc6..e6870f70df 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0.sql index bd6f588d15..508b81403f 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0_optimized.sql index c2fdbe4da6..af4f0e6e8c 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_categorical_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_categorical_filter__plan0.sql index d899680061..5cf792812d 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_categorical_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_categorical_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_categorical_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_categorical_filter__plan0_optimized.sql index fa46f1c6ec..cc0b9d4525 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_categorical_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_categorical_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_different_time_dimension_grains__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_different_time_dimension_grains__plan0.sql index c4b59626e1..7898aea428 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_different_time_dimension_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_different_time_dimension_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys_month AS DOUBLE) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_with_monthly_conversion diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql index 85a9e03a3a..bd853c11ba 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter__plan0.sql index 2c384b37f8..c6e8d8562f 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_16.buys AS DOUBLE) / CAST(NULLIF(subq_16.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter__plan0_optimized.sql index fb4067e554..8b7c3ad9c7 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter_not_in_group_by__plan0.sql index 6f6ae0d53c..750ee7c86a 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql index c8764c9789..3cb2f28331 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_time_constraint__plan0.sql index 14520c5d5f..a457070fdf 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_time_constraint__plan0_optimized.sql index 432df4ebbd..97d7c95d37 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window__plan0.sql index 4872fb5a84..05b2341cd4 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window__plan0_optimized.sql index b94491d8f7..427c1c412f 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window_and_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window_and_time_constraint__plan0.sql index 6f1774918f..4209390c2a 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window_and_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window_and_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql index 2c709a58be..e3a578d7c9 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric__plan0.sql index e31bbd0ca8..4b8e7116fe 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric__plan0_optimized.sql index 8d2a141ee1..a61dca03a3 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_categorical_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_categorical_filter__plan0.sql index fafe48fda9..8ca4a4c9a2 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_categorical_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_categorical_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_categorical_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_categorical_filter__plan0_optimized.sql index e8dd581b01..234713904d 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_categorical_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_categorical_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_different_time_dimension_grains__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_different_time_dimension_grains__plan0.sql index b806c84840..a5fd43d0bb 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_different_time_dimension_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_different_time_dimension_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys_month AS DOUBLE PRECISION) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE PRECISION) AS visit_buy_conversion_rate_with_monthly_conversion diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql index 8d8994aca3..5b8c5d64bd 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter__plan0.sql index afe24609a4..5de3b84d5d 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_16.buys AS DOUBLE PRECISION) / CAST(NULLIF(subq_16.visits, 0) AS DOUBLE PRECISION) AS visit_buy_conversion_rate diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter__plan0_optimized.sql index db2e8ca660..95f4e0db4b 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter_not_in_group_by__plan0.sql index 15847b2f1d..d70d3c75e4 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql index e0ba2bde48..4b7b2412d4 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_time_constraint__plan0.sql index 13a210cc87..fee729d2be 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_time_constraint__plan0_optimized.sql index fd39950653..56abc9fa48 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window__plan0.sql index ad99382b42..11923a26f3 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window__plan0_optimized.sql index 4eea2fff8e..223d9a8105 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window_and_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window_and_time_constraint__plan0.sql index ef92a10f35..bedf096233 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window_and_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window_and_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql index ba50c1da38..72f8f2b55a 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric__plan0.sql index 2b9f26acfb..82dce99f10 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric__plan0_optimized.sql index 8e716dd9d0..40083d4db9 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_categorical_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_categorical_filter__plan0.sql index 6aa7d0efa8..5a1acf5074 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_categorical_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_categorical_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_categorical_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_categorical_filter__plan0_optimized.sql index d30d5419ad..05724b9092 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_categorical_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_categorical_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_different_time_dimension_grains__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_different_time_dimension_grains__plan0.sql index 18a8199cd0..bc53aaa511 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_different_time_dimension_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_different_time_dimension_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys_month AS DOUBLE PRECISION) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE PRECISION) AS visit_buy_conversion_rate_with_monthly_conversion diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql index e7b86e083b..85a662a9df 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter__plan0.sql index 38f395b85b..1dbf9718f3 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_16.buys AS DOUBLE PRECISION) / CAST(NULLIF(subq_16.visits, 0) AS DOUBLE PRECISION) AS visit_buy_conversion_rate diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter__plan0_optimized.sql index d7c9cee347..637d2eb07b 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter_not_in_group_by__plan0.sql index f370714730..88e0803b06 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql index 581e6904a4..f77583d660 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_time_constraint__plan0.sql index e3dc18de5c..a4a3cbcbd3 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_time_constraint__plan0_optimized.sql index d50f2f65cb..2cd381752d 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window__plan0.sql index e8b37ff907..0be0fc6a6b 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window__plan0_optimized.sql index 848cfcda4f..a17f9dbd24 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window_and_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window_and_time_constraint__plan0.sql index 24fb22698f..d2cf8c2e98 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window_and_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window_and_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql index 3bf1885e34..f4efc628b7 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric__plan0.sql index 20aea8ac32..5a5aaeb970 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric__plan0_optimized.sql index 418f779dc4..707370b16c 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_categorical_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_categorical_filter__plan0.sql index 5bfd04c6eb..abc0dde7f4 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_categorical_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_categorical_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_categorical_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_categorical_filter__plan0_optimized.sql index c60e292914..6fd688c485 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_categorical_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_categorical_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_different_time_dimension_grains__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_different_time_dimension_grains__plan0.sql index 0d460bca22..184bb75c62 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_different_time_dimension_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_different_time_dimension_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys_month AS DOUBLE) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_with_monthly_conversion diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql index 868cab409d..7512ef9165 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter__plan0.sql index 5e4e7f7193..ff25931880 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_16.buys AS DOUBLE) / CAST(NULLIF(subq_16.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter__plan0_optimized.sql index ffec593847..69aac853b8 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter_not_in_group_by__plan0.sql index d38a6397b5..1f16a96a55 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql index 615d55e244..7471826ead 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_time_constraint__plan0.sql index 287ae4bafc..6868453162 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_time_constraint__plan0_optimized.sql index b7866da040..b8e12265d9 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window__plan0.sql index 08455330a8..cb206e2723 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window__plan0_optimized.sql index ef268f3858..5bfd6106a5 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window_and_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window_and_time_constraint__plan0.sql index ce1dfd5532..3687a3b880 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window_and_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window_and_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql index 6276a9f1eb..6052c066c3 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric__plan0.sql index 41e61a7a80..54a24c0aed 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric__plan0_optimized.sql index 03486b0bcb..d6b2428ab8 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_categorical_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_categorical_filter__plan0.sql index 7e2dacfe75..6f1f5a44f6 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_categorical_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_categorical_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_categorical_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_categorical_filter__plan0_optimized.sql index 2f21607f4f..54a6bb0a3c 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_categorical_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_categorical_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_different_time_dimension_grains__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_different_time_dimension_grains__plan0.sql index e652537bd6..60db263e56 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_different_time_dimension_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_different_time_dimension_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys_month AS DOUBLE) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_with_monthly_conversion diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql index dd903d6afb..7e0443d6a6 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_different_time_dimension_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter__plan0.sql index dd1cd79886..4b9981cf5f 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT CAST(subq_16.buys AS DOUBLE) / CAST(NULLIF(subq_16.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter__plan0_optimized.sql index 8828f1ee14..c562ccad44 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter_not_in_group_by__plan0.sql index 232d0421de..0c20372079 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_16.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql index c5d4d76435..bf08bb885b 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_time_constraint__plan0.sql index bafac5df4e..d652f46539 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_time_constraint__plan0_optimized.sql index ed1a96751f..0047772512 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a time constraint and categorical filter. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window__plan0.sql index 485cfd6a9a..b563fe3390 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window__plan0_optimized.sql index 3435f7cc4a..da3a95bc07 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window_and_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window_and_time_constraint__plan0.sql index 4e802eb75b..34df32b7fa 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window_and_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window_and_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql index a573ea1b51..7f8be1f971 100644 --- a/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metric_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_with_window_and_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metric_rendering.py +docstring: + Test rendering a query against a conversion metric with a window, time constraint, and categorical filter. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric__query_output.txt index d59c3ac1da..682f412aca 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric. +--- metric_time__day visit_buy_conversion_rate ------------------- --------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_categorical_filter__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_categorical_filter__query_output.txt index e1e5bd822d..82301fa3fd 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_categorical_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_categorical_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate ------------------- -------------------- --------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_different_time_dimension_grains__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_different_time_dimension_grains__query_output.txt index f40e6c26d0..1bb9f58bb1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_different_time_dimension_grains__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_different_time_dimension_grains__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversion_rate_with_monthly_conversion --------------------------------------------------- 0.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_filter_not_in_group_by__query_output.txt index e3046748a3..47e542d323 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversions ----------------------- 3 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_time_constraint__query_output.txt index 3fb6f042e8..e6a876dacb 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a time constraint and categorical filter. +--- visit__referrer_id visit_buy_conversion_rate -------------------- --------------------------- fb_ad_1 1.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_window__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_window__query_output.txt index 294fbf9259..7a14f08d1e 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_window__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_window__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window. +--- metric_time__day visit_buy_conversion_rate_7days ------------------- --------------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_window_and_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_window_and_time_constraint__query_output.txt index b4958e8622..d6d0405a72 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_window_and_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/BigQuery/test_conversion_metric_with_window_and_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window, time constraint, and categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate_7days ------------------- -------------------- --------------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric__query_output.txt index d59c3ac1da..682f412aca 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric. +--- metric_time__day visit_buy_conversion_rate ------------------- --------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_categorical_filter__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_categorical_filter__query_output.txt index e1e5bd822d..82301fa3fd 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_categorical_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_categorical_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate ------------------- -------------------- --------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_different_time_dimension_grains__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_different_time_dimension_grains__query_output.txt index f40e6c26d0..1bb9f58bb1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_different_time_dimension_grains__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_different_time_dimension_grains__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversion_rate_with_monthly_conversion --------------------------------------------------- 0.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_filter_not_in_group_by__query_output.txt index e3046748a3..47e542d323 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversions ----------------------- 3 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_time_constraint__query_output.txt index 3fb6f042e8..e6a876dacb 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a time constraint and categorical filter. +--- visit__referrer_id visit_buy_conversion_rate -------------------- --------------------------- fb_ad_1 1.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_window__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_window__query_output.txt index 294fbf9259..7a14f08d1e 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_window__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_window__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window. +--- metric_time__day visit_buy_conversion_rate_7days ------------------- --------------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_window_and_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_window_and_time_constraint__query_output.txt index b4958e8622..d6d0405a72 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_window_and_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Databricks/test_conversion_metric_with_window_and_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window, time constraint, and categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate_7days ------------------- -------------------- --------------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric__query_output.txt index d59c3ac1da..682f412aca 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric. +--- metric_time__day visit_buy_conversion_rate ------------------- --------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_categorical_filter__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_categorical_filter__query_output.txt index e1e5bd822d..82301fa3fd 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_categorical_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_categorical_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate ------------------- -------------------- --------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_different_time_dimension_grains__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_different_time_dimension_grains__query_output.txt index f40e6c26d0..1bb9f58bb1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_different_time_dimension_grains__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_different_time_dimension_grains__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversion_rate_with_monthly_conversion --------------------------------------------------- 0.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_filter_not_in_group_by__query_output.txt index e3046748a3..47e542d323 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversions ----------------------- 3 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_time_constraint__query_output.txt index 3fb6f042e8..e6a876dacb 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a time constraint and categorical filter. +--- visit__referrer_id visit_buy_conversion_rate -------------------- --------------------------- fb_ad_1 1.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_window__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_window__query_output.txt index 294fbf9259..7a14f08d1e 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_window__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_window__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window. +--- metric_time__day visit_buy_conversion_rate_7days ------------------- --------------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_window_and_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_window_and_time_constraint__query_output.txt index b4958e8622..d6d0405a72 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_window_and_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/DuckDB/test_conversion_metric_with_window_and_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window, time constraint, and categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate_7days ------------------- -------------------- --------------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric__query_output.txt index d59c3ac1da..682f412aca 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric. +--- metric_time__day visit_buy_conversion_rate ------------------- --------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_categorical_filter__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_categorical_filter__query_output.txt index e1e5bd822d..82301fa3fd 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_categorical_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_categorical_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate ------------------- -------------------- --------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_different_time_dimension_grains__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_different_time_dimension_grains__query_output.txt index f40e6c26d0..1bb9f58bb1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_different_time_dimension_grains__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_different_time_dimension_grains__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversion_rate_with_monthly_conversion --------------------------------------------------- 0.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_filter_not_in_group_by__query_output.txt index e3046748a3..47e542d323 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversions ----------------------- 3 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_time_constraint__query_output.txt index 3fb6f042e8..e6a876dacb 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a time constraint and categorical filter. +--- visit__referrer_id visit_buy_conversion_rate -------------------- --------------------------- fb_ad_1 1.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_window__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_window__query_output.txt index 294fbf9259..7a14f08d1e 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_window__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_window__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window. +--- metric_time__day visit_buy_conversion_rate_7days ------------------- --------------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_window_and_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_window_and_time_constraint__query_output.txt index b4958e8622..d6d0405a72 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_window_and_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Postgres/test_conversion_metric_with_window_and_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window, time constraint, and categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate_7days ------------------- -------------------- --------------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric__query_output.txt index d59c3ac1da..682f412aca 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric. +--- metric_time__day visit_buy_conversion_rate ------------------- --------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_categorical_filter__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_categorical_filter__query_output.txt index e1e5bd822d..82301fa3fd 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_categorical_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_categorical_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate ------------------- -------------------- --------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_different_time_dimension_grains__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_different_time_dimension_grains__query_output.txt index f40e6c26d0..1bb9f58bb1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_different_time_dimension_grains__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_different_time_dimension_grains__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversion_rate_with_monthly_conversion --------------------------------------------------- 0.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_filter_not_in_group_by__query_output.txt index e3046748a3..47e542d323 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversions ----------------------- 3 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_time_constraint__query_output.txt index 3fb6f042e8..e6a876dacb 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a time constraint and categorical filter. +--- visit__referrer_id visit_buy_conversion_rate -------------------- --------------------------- fb_ad_1 1.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_window__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_window__query_output.txt index 294fbf9259..7a14f08d1e 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_window__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_window__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window. +--- metric_time__day visit_buy_conversion_rate_7days ------------------- --------------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_window_and_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_window_and_time_constraint__query_output.txt index b4958e8622..d6d0405a72 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_window_and_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Redshift/test_conversion_metric_with_window_and_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window, time constraint, and categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate_7days ------------------- -------------------- --------------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric__query_output.txt index 57e6611f5c..5efc92d76b 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric. +--- METRIC_TIME__DAY VISIT_BUY_CONVERSION_RATE ------------------- --------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_categorical_filter__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_categorical_filter__query_output.txt index c8138396fe..01445cbab8 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_categorical_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_categorical_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a categorical filter. +--- METRIC_TIME__DAY VISIT__REFERRER_ID VISIT_BUY_CONVERSION_RATE ------------------- -------------------- --------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_different_time_dimension_grains__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_different_time_dimension_grains__query_output.txt index 3f8349cae8..e2c1a07c89 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_different_time_dimension_grains__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_different_time_dimension_grains__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- VISIT_BUY_CONVERSION_RATE_WITH_MONTHLY_CONVERSION --------------------------------------------------- 0.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_filter_not_in_group_by__query_output.txt index 9cbe5f4439..1a55646113 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- VISIT_BUY_CONVERSIONS ----------------------- 3 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_time_constraint__query_output.txt index 53b4574200..049c4f58f6 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a time constraint and categorical filter. +--- VISIT__REFERRER_ID VISIT_BUY_CONVERSION_RATE -------------------- --------------------------- fb_ad_1 1.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_window__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_window__query_output.txt index 1d3f1dd15a..4f0764483c 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_window__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_window__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window. +--- METRIC_TIME__DAY VISIT_BUY_CONVERSION_RATE_7DAYS ------------------- --------------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_window_and_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_window_and_time_constraint__query_output.txt index fd1601ac58..b925366dfc 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_window_and_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Snowflake/test_conversion_metric_with_window_and_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window, time constraint, and categorical filter. +--- METRIC_TIME__DAY VISIT__REFERRER_ID VISIT_BUY_CONVERSION_RATE_7DAYS ------------------- -------------------- --------------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric__query_output.txt index d59c3ac1da..682f412aca 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric. +--- metric_time__day visit_buy_conversion_rate ------------------- --------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_categorical_filter__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_categorical_filter__query_output.txt index e1e5bd822d..82301fa3fd 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_categorical_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_categorical_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_categorical_filter +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate ------------------- -------------------- --------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_different_time_dimension_grains__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_different_time_dimension_grains__query_output.txt index f40e6c26d0..1bb9f58bb1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_different_time_dimension_grains__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_different_time_dimension_grains__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_different_time_dimension_grains +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversion_rate_with_monthly_conversion --------------------------------------------------- 0.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_filter_not_in_group_by__query_output.txt index e3046748a3..47e542d323 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_filter_not_in_group_by +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a filter that doesn't exist in group by. +--- visit_buy_conversions ----------------------- 3 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_time_constraint__query_output.txt index 3fb6f042e8..e6a876dacb 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a time constraint and categorical filter. +--- visit__referrer_id visit_buy_conversion_rate -------------------- --------------------------- fb_ad_1 1.5 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_window__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_window__query_output.txt index 294fbf9259..7a14f08d1e 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_window__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_window__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window. +--- metric_time__day visit_buy_conversion_rate_7days ------------------- --------------------------------- 2020-01-01T00:00:00 0.50 diff --git a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_window_and_time_constraint__query_output.txt b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_window_and_time_constraint__query_output.txt index b4958e8622..d6d0405a72 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_window_and_time_constraint__query_output.txt +++ b/tests_metricflow/snapshots/test_conversion_metrics.py/str/Trino/test_conversion_metric_with_window_and_time_constraint__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_with_window_and_time_constraint +test_filename: test_conversion_metrics.py +docstring: + Test query against a conversion metric with a window, time constraint, and categorical filter. +--- metric_time__day visit__referrer_id visit_buy_conversion_rate_7days ------------------- -------------------- --------------------------------- 2020-01-01T00:00:00 fb_ad_1 2 diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_count_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_count_with_no_group_by__plan0.sql index 53d91d5592..d7aa72453d 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_count_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_count_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_count_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_count_with_no_group_by__plan0_optimized.sql index dc661d23da..bb57cf0071 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_count_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_count_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql index d6d5a286ed..2810e908f0 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT subq_20.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql index db92fbc4f6..8b366b8caa 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate__plan0.sql index 1cabaa69bd..6ff4eaeb20 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate__plan0_optimized.sql index fb70e09be4..4ae14a4fee 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_constant_properties__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_constant_properties__plan0.sql index d2fc487da7..c87b846b1f 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_constant_properties__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_constant_properties__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_constant_properties__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_constant_properties__plan0_optimized.sql index ecb9bba0fb..fcd1e5a08f 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_constant_properties__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_constant_properties__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_no_group_by__plan0.sql index 03e0a56f5b..5e3cfa8299 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys AS FLOAT64) / CAST(NULLIF(subq_14.visits, 0) AS FLOAT64) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_no_group_by__plan0_optimized.sql index 0d04537431..22369744a7 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_window__plan0.sql index 7938df5f39..816fe842a3 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_window__plan0_optimized.sql index 8ad8d9be1a..7ca2f0ee1e 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/BigQuery/test_conversion_rate_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_count_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_count_with_no_group_by__plan0.sql index df58845c2c..b026bdbdd2 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_count_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_count_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_count_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_count_with_no_group_by__plan0_optimized.sql index 7750aea315..ba94091157 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_count_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_count_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql index b0c75bdd56..98e2dc96cb 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT subq_20.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql index 3b6b6a7d10..7df9acfe2a 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate__plan0.sql index ac5e48a912..4eda32e1a7 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate__plan0_optimized.sql index 4b15082983..9b9d075db7 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_constant_properties__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_constant_properties__plan0.sql index f402dcfc0b..0d2da759ec 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_constant_properties__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_constant_properties__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_constant_properties__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_constant_properties__plan0_optimized.sql index 8b27da0524..8b02baead2 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_constant_properties__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_constant_properties__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_no_group_by__plan0.sql index 943dfdb177..27bde82c11 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys AS DOUBLE) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_no_group_by__plan0_optimized.sql index 437abac5ac..24e893cf7d 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_window__plan0.sql index 7f32833643..4e7f57fa9d 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_window__plan0_optimized.sql index 388a855317..58cf97f1a2 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Databricks/test_conversion_rate_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_count_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_count_with_no_group_by__plan0.sql index c6fab697ea..fc77b59837 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_count_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_count_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_count_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_count_with_no_group_by__plan0_optimized.sql index 2ffa54742d..def37d78b0 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_count_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_count_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql index 3225ebe2fd..5288d9c5b9 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT subq_20.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql index c8539620cc..65e5761746 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate__plan0.sql index 32223e9902..5f125fdeec 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate__plan0_optimized.sql index 7dc3a8fbe0..6ebbe901ec 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_constant_properties__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_constant_properties__plan0.sql index 4c4e2e61d0..7a80ab6c85 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_constant_properties__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_constant_properties__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_constant_properties__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_constant_properties__plan0_optimized.sql index e0b7d38803..cc2e7c6aea 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_constant_properties__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_constant_properties__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_no_group_by__plan0.sql index bb3125b634..bf9e8e66b1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys AS DOUBLE) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_no_group_by__plan0_optimized.sql index e0deac086e..cea9e6fb9d 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_window__plan0.sql index 8628ab8e1e..f0a46293a9 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_window__plan0_optimized.sql index 4033cb003a..5338f8b8d0 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/DuckDB/test_conversion_rate_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_count_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_count_with_no_group_by__plan0.sql index 438713e351..f9c9eaf195 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_count_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_count_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_count_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_count_with_no_group_by__plan0_optimized.sql index 644a020582..c833243b7d 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_count_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_count_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql index 3a2e3ca546..a5e2da6624 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT subq_20.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql index ea19b8ccaf..6b06d81d62 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate__plan0.sql index 1a1768ea8c..a16b9cce51 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate__plan0_optimized.sql index 0bc7b2572d..d48db4d537 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_constant_properties__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_constant_properties__plan0.sql index bdae8bc2bd..0d6106eb56 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_constant_properties__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_constant_properties__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_constant_properties__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_constant_properties__plan0_optimized.sql index 6e090a2d70..c8e0908cd4 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_constant_properties__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_constant_properties__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_no_group_by__plan0.sql index 29154eaa72..9d7ec879ba 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys AS DOUBLE PRECISION) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE PRECISION) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_no_group_by__plan0_optimized.sql index ff4820b97f..60392a120b 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_window__plan0.sql index ba765b466e..639b3467c4 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_window__plan0_optimized.sql index 4b435c6274..678471aeac 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Postgres/test_conversion_rate_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_count_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_count_with_no_group_by__plan0.sql index 8eb5d0df3b..9ea2964878 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_count_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_count_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_count_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_count_with_no_group_by__plan0_optimized.sql index 5806eade12..d61cb7a6de 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_count_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_count_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql index 4bd4463180..dacc7c385b 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT subq_20.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql index 4f0ee185f2..1823b3f551 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate__plan0.sql index 73af476dea..caaf449dc1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate__plan0_optimized.sql index 764eb90a68..9c8df907e7 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_constant_properties__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_constant_properties__plan0.sql index 1366263133..d10a543752 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_constant_properties__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_constant_properties__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_constant_properties__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_constant_properties__plan0_optimized.sql index 78ff7c1d5e..0e945e81ee 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_constant_properties__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_constant_properties__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_no_group_by__plan0.sql index 33e927913c..f7507b6fdc 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys AS DOUBLE PRECISION) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE PRECISION) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_no_group_by__plan0_optimized.sql index 609aef3281..62adf1433c 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_window__plan0.sql index b97529996f..19e07b8c1f 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_window__plan0_optimized.sql index ef463ecf46..22434ab2a8 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Redshift/test_conversion_rate_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_count_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_count_with_no_group_by__plan0.sql index 9395a3f373..73dde1702f 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_count_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_count_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_count_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_count_with_no_group_by__plan0_optimized.sql index b4be44181b..e360b334f1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_count_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_count_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql index 71b0e54125..4c539b0f1d 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT subq_20.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql index 7a7b4644b9..fde78788f2 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate__plan0.sql index faf09af580..cbb18591d1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate__plan0_optimized.sql index b8438fb6d2..2015b92d52 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_constant_properties__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_constant_properties__plan0.sql index e3d23e5de3..d18aa63600 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_constant_properties__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_constant_properties__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_constant_properties__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_constant_properties__plan0_optimized.sql index 7a87252bb1..4d539213b4 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_constant_properties__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_constant_properties__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_no_group_by__plan0.sql index 2c635d12c8..a359520edc 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys AS DOUBLE) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_no_group_by__plan0_optimized.sql index ed7946d108..54277d5296 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_window__plan0.sql index 75c20e66ba..03d1d18f7f 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_window__plan0_optimized.sql index 3d68125f0f..9a79000186 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Snowflake/test_conversion_rate_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_count_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_count_with_no_group_by__plan0.sql index 50bf8541bf..e7a92b113e 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_count_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_count_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.buys AS visit_buy_conversions diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_count_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_count_with_no_group_by__plan0_optimized.sql index ce47055eb3..2281b7fbdc 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_count_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_count_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql index a5c13d96bb..32664f5216 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT subq_20.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql index 011fc4a030..269bc8cf91 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate__plan0.sql index 20f9bd3aa3..ee5da967d6 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate__plan0_optimized.sql index 1b2786fd34..3d41f56ec1 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT visit__referrer_id diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_constant_properties__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_constant_properties__plan0.sql index b7bdd0ad1e..4ae76f69bf 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_constant_properties__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_constant_properties__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_constant_properties__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_constant_properties__plan0_optimized.sql index 0a926c1c54..03620fb2e6 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_constant_properties__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_constant_properties__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_no_group_by__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_no_group_by__plan0.sql index 959dc86edf..e09b4d6ce4 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_no_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_no_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT CAST(subq_14.buys AS DOUBLE) / CAST(NULLIF(subq_14.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_no_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_no_group_by__plan0_optimized.sql index acf015a8fe..9b35859b59 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_no_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_no_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_window__plan0.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_window__plan0.sql index dab39b09a5..bce3086f23 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_window__plan0.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT subq_14.metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_window__plan0_optimized.sql index 08abee0a00..2895ab522a 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/Trino/test_conversion_rate_with_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_count_with_no_group_by__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_count_with_no_group_by__plan0.xml index a92ddfb4c8..6bf6944037 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_count_with_no_group_by__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_count_with_no_group_by__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_conversion_count_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.xml index 96e251424e..dd8775bbe2 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_metric_join_to_timespine_and_fill_nulls_with_0__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_join_to_timespine_and_fill_nulls_with_0 +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric that joins to time spine and fills nulls with 0. +--- diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate__plan0.xml index ad045d1355..b78a3efcb5 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_conversion_rate +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric data flow plan rendering. +--- diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_constant_properties__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_constant_properties__plan0.xml index bbddd65850..0f6fd98610 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_constant_properties__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_constant_properties__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_constant_properties +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with constant properties by data flow plan rendering. +--- diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_no_group_by__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_no_group_by__plan0.xml index daf29c3fc2..9a7bf02f34 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_no_group_by__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_no_group_by__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_no_group_by +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with no group by data flow plan rendering. +--- diff --git a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_window__plan0.xml b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_window__plan0.xml index e53ad567a0..a3ef7b14cb 100644 --- a/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_window__plan0.xml +++ b/tests_metricflow/snapshots/test_conversion_metrics_to_sql.py/SqlQueryPlan/test_conversion_rate_with_window__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_conversion_rate_with_window +test_filename: test_conversion_metrics_to_sql.py +docstring: + Test conversion metric with a window data flow plan rendering. +--- diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_query_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_query_semantic_model__plan0.sql index 9ce0459e87..b2e0dcad78 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_query_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_query_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_convert_query_semantic_model +test_filename: test_convert_semantic_model.py +--- -- Read Elements From Semantic Model 'revenue' SELECT revenue_src_28000.revenue AS txn_revenue diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_with_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_with_measures__plan0.sql index a5d84f15f3..7713ddc8f5 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_with_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_with_measures__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_convert_table_semantic_model_with_measures +test_filename: test_convert_semantic_model.py +docstring: + Complete test of table semantic model conversion. This includes the full set of measures/entities/dimensions. + + Measures trigger a primary time dimension validation. Additionally, this includes both categorical and time + dimension types, which should cover most, if not all, of the table source branches in the target class. +--- -- Read Elements From Semantic Model 'id_verifications' SELECT 1 AS identity_verifications diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql index bf8885b259..3d99a520a6 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/BigQuery/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_convert_table_semantic_model_without_measures +test_filename: test_convert_semantic_model.py +docstring: + Simple test for converting a table semantic model. Since there are no measures, primary time is not checked. +--- -- Read Elements From Semantic Model 'users_latest' SELECT DATETIME_TRUNC(users_latest_src_28000.ds, day) AS ds_latest__day diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_query_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_query_semantic_model__plan0.sql index 2d90fd9d75..5db27c1e72 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_query_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_query_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_convert_query_semantic_model +test_filename: test_convert_semantic_model.py +--- -- Read Elements From Semantic Model 'revenue' SELECT revenue_src_28000.revenue AS txn_revenue diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_with_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_with_measures__plan0.sql index 69baac5f43..7a9d2d2cba 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_with_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_with_measures__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_convert_table_semantic_model_with_measures +test_filename: test_convert_semantic_model.py +docstring: + Complete test of table semantic model conversion. This includes the full set of measures/entities/dimensions. + + Measures trigger a primary time dimension validation. Additionally, this includes both categorical and time + dimension types, which should cover most, if not all, of the table source branches in the target class. +--- -- Read Elements From Semantic Model 'id_verifications' SELECT 1 AS identity_verifications diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_without_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_without_measures__plan0.sql index 565bd5f4f0..5f34bce80b 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Databricks/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_convert_table_semantic_model_without_measures +test_filename: test_convert_semantic_model.py +docstring: + Simple test for converting a table semantic model. Since there are no measures, primary time is not checked. +--- -- Read Elements From Semantic Model 'users_latest' SELECT DATE_TRUNC('day', users_latest_src_28000.ds) AS ds_latest__day diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_query_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_query_semantic_model__plan0.sql index fb7e89c2c9..7e34b0001e 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_query_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_query_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_convert_query_semantic_model +test_filename: test_convert_semantic_model.py +--- -- Read Elements From Semantic Model 'revenue' SELECT revenue_src_28000.revenue AS txn_revenue diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_with_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_with_measures__plan0.sql index e05f176f0d..345cda7ee6 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_with_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_with_measures__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_convert_table_semantic_model_with_measures +test_filename: test_convert_semantic_model.py +docstring: + Complete test of table semantic model conversion. This includes the full set of measures/entities/dimensions. + + Measures trigger a primary time dimension validation. Additionally, this includes both categorical and time + dimension types, which should cover most, if not all, of the table source branches in the target class. +--- -- Read Elements From Semantic Model 'id_verifications' SELECT 1 AS identity_verifications diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_without_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_without_measures__plan0.sql index ac68907b77..6d8f56f1d4 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/DuckDB/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_convert_table_semantic_model_without_measures +test_filename: test_convert_semantic_model.py +docstring: + Simple test for converting a table semantic model. Since there are no measures, primary time is not checked. +--- -- Read Elements From Semantic Model 'users_latest' SELECT DATE_TRUNC('day', users_latest_src_28000.ds) AS ds_latest__day diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_query_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_query_semantic_model__plan0.sql index fb7e89c2c9..7e34b0001e 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_query_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_query_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_convert_query_semantic_model +test_filename: test_convert_semantic_model.py +--- -- Read Elements From Semantic Model 'revenue' SELECT revenue_src_28000.revenue AS txn_revenue diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_with_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_with_measures__plan0.sql index e05f176f0d..345cda7ee6 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_with_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_with_measures__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_convert_table_semantic_model_with_measures +test_filename: test_convert_semantic_model.py +docstring: + Complete test of table semantic model conversion. This includes the full set of measures/entities/dimensions. + + Measures trigger a primary time dimension validation. Additionally, this includes both categorical and time + dimension types, which should cover most, if not all, of the table source branches in the target class. +--- -- Read Elements From Semantic Model 'id_verifications' SELECT 1 AS identity_verifications diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_without_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_without_measures__plan0.sql index ac68907b77..6d8f56f1d4 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Postgres/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_convert_table_semantic_model_without_measures +test_filename: test_convert_semantic_model.py +docstring: + Simple test for converting a table semantic model. Since there are no measures, primary time is not checked. +--- -- Read Elements From Semantic Model 'users_latest' SELECT DATE_TRUNC('day', users_latest_src_28000.ds) AS ds_latest__day diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_query_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_query_semantic_model__plan0.sql index 111741670d..eb7b6a4d74 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_query_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_query_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_convert_query_semantic_model +test_filename: test_convert_semantic_model.py +--- -- Read Elements From Semantic Model 'revenue' SELECT revenue_src_28000.revenue AS txn_revenue diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_with_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_with_measures__plan0.sql index a447b8d7ee..f0a688af6b 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_with_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_with_measures__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_convert_table_semantic_model_with_measures +test_filename: test_convert_semantic_model.py +docstring: + Complete test of table semantic model conversion. This includes the full set of measures/entities/dimensions. + + Measures trigger a primary time dimension validation. Additionally, this includes both categorical and time + dimension types, which should cover most, if not all, of the table source branches in the target class. +--- -- Read Elements From Semantic Model 'id_verifications' SELECT 1 AS identity_verifications diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_without_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_without_measures__plan0.sql index 462d46fffe..8a01dd7dc7 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Redshift/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_convert_table_semantic_model_without_measures +test_filename: test_convert_semantic_model.py +docstring: + Simple test for converting a table semantic model. Since there are no measures, primary time is not checked. +--- -- Read Elements From Semantic Model 'users_latest' SELECT DATE_TRUNC('day', users_latest_src_28000.ds) AS ds_latest__day diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_query_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_query_semantic_model__plan0.sql index 6b9b65c844..cc23682a9c 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_query_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_query_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_convert_query_semantic_model +test_filename: test_convert_semantic_model.py +--- -- Read Elements From Semantic Model 'revenue' SELECT revenue_src_28000.revenue AS txn_revenue diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_with_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_with_measures__plan0.sql index 48f4803c55..2f73d9c245 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_with_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_with_measures__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_convert_table_semantic_model_with_measures +test_filename: test_convert_semantic_model.py +docstring: + Complete test of table semantic model conversion. This includes the full set of measures/entities/dimensions. + + Measures trigger a primary time dimension validation. Additionally, this includes both categorical and time + dimension types, which should cover most, if not all, of the table source branches in the target class. +--- -- Read Elements From Semantic Model 'id_verifications' SELECT 1 AS identity_verifications diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_without_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_without_measures__plan0.sql index fc332b8845..31dacf281a 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Snowflake/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_convert_table_semantic_model_without_measures +test_filename: test_convert_semantic_model.py +docstring: + Simple test for converting a table semantic model. Since there are no measures, primary time is not checked. +--- -- Read Elements From Semantic Model 'users_latest' SELECT DATE_TRUNC('day', users_latest_src_28000.ds) AS ds_latest__day diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_query_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_query_semantic_model__plan0.sql index 92e117a564..f4a1191cc9 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_query_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_query_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_convert_query_semantic_model +test_filename: test_convert_semantic_model.py +--- -- Read Elements From Semantic Model 'revenue' SELECT revenue_src_28000.revenue AS txn_revenue diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_table_semantic_model_with_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_table_semantic_model_with_measures__plan0.sql index 1a6868177f..ffdc5d5c24 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_table_semantic_model_with_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_table_semantic_model_with_measures__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_convert_table_semantic_model_with_measures +test_filename: test_convert_semantic_model.py +docstring: + Complete test of table semantic model conversion. This includes the full set of measures/entities/dimensions. + + Measures trigger a primary time dimension validation. Additionally, this includes both categorical and time + dimension types, which should cover most, if not all, of the table source branches in the target class. +--- -- Read Elements From Semantic Model 'id_verifications' SELECT 1 AS identity_verifications diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_table_semantic_model_without_measures__plan0.sql b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_table_semantic_model_without_measures__plan0.sql index 23cdfc8a20..2647c738c6 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_table_semantic_model_without_measures__plan0.sql +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/SqlQueryPlan/Trino/test_convert_table_semantic_model_without_measures__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_convert_table_semantic_model_without_measures +test_filename: test_convert_semantic_model.py +docstring: + Simple test for converting a table semantic model. Since there are no measures, primary time is not checked. +--- -- Read Elements From Semantic Model 'users_latest' SELECT DATE_TRUNC('day', users_latest_src_28000.ds) AS ds_latest__day diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt b/tests_metricflow/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt index cf0d6b0c26..5f4b2224bb 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_with_measures__result0.txt @@ -1,3 +1,11 @@ +test_name: test_convert_table_semantic_model_with_measures +test_filename: test_convert_semantic_model.py +docstring: + Complete test of table semantic model conversion. This includes the full set of measures/entities/dimensions. + + Measures trigger a primary time dimension validation. Additionally, this includes both categorical and time + dimension types, which should cover most, if not all, of the table source branches in the target class. +--- [ 'ds__day', 'ds__extract_day', diff --git a/tests_metricflow/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt b/tests_metricflow/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt index 4cc54a4491..0b23c61072 100644 --- a/tests_metricflow/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt +++ b/tests_metricflow/snapshots/test_convert_semantic_model.py/list/test_convert_table_semantic_model_without_measures__result0.txt @@ -1,3 +1,8 @@ +test_name: test_convert_table_semantic_model_without_measures +test_filename: test_convert_semantic_model.py +docstring: + Simple test for converting a table semantic model. Since there are no measures, primary time is not checked. +--- [ 'ds_latest__day', 'ds_latest__extract_day', diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_all_time_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_all_time_metric_with_non_default_grains__plan0.sql index 316a400d37..a27ccb639b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_all_time_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_all_time_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_all_time_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_all_time_metric_with_non_default_grains__plan0_optimized.sql index d73d322978..a7b287f78b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_all_time_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_all_time_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql index c1980b1f08..8b96d59ee0 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql index e5be7b428a..36447559b3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql index 0ead1ebe91..e2590eb89a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql index 4269bad578..54fb032179 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_grain_to_date__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql index d663c8e103..f7b0247f0e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Compute Metrics via Expressions SELECT subq_3.txn_revenue AS trailing_2_months_revenue diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql index 4a0d5baff3..09fc4701f7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_ds__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue',] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql index 2c53459080..24cb313683 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql index e3154d1428..7e3e6487a3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql index b841334dd6..30045d6f48 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql index 1288af43aa..acce3e90f4 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql index 9a380af47b..af1b0df837 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql index 92ecb975a7..8407313e0c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_dimension__plan0.sql index 67fa8d1d50..3ea577dff0 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql index 8589fc64c5..d6b0798c94 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql index 9a2756e2e4..aa4639cad7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql index 55c6a28bcb..ca715a49e4 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql index e9ecb3012a..dc263ebb76 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql index 9fc90bbefa..0d3298fd86 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'metric_time__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql index e463f8a456..ff86c0d3df 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql index 5e9134eca7..3674fd4b6c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_default_grain__plan0.sql index 5a32c02251..21bea8b150 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql index fdb226eeab..46f9ac3718 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql index 9b5da71e24..7f50e249e0 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql index 880c0ae9d3..bd2f8b038e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_cumulative_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_cumulative_metric_with_non_default_grains__plan0.sql index 04d2e6bc32..127287d46c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_cumulative_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_cumulative_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql index 03bf1b955d..10ed9b2e01 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grain__plan0.sql index 8b8fffd466..a988ede17d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql index 9d34e5ebc5..f188980281 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grains__plan0.sql index a27dd03f80..0e575fc53b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql index cc67ceda02..3f94674338 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grain__plan0.sql index 643c8d2d08..827180070f 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grain__plan0_optimized.sql index 52691bc6c0..191817fe2b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grains__plan0.sql index d2e200202c..31dec94bb9 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_11.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grains__plan0_optimized.sql index af0a033349..62b6ace8e4 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/BigQuery/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_all_time_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_all_time_metric_with_non_default_grains__plan0.sql index 095212d4a4..92bea9af85 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_all_time_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_all_time_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_all_time_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_all_time_metric_with_non_default_grains__plan0_optimized.sql index 5150db08e3..7819f94d96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_all_time_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_all_time_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql index 62d5265eb0..e43f762ed0 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql index 76e8f3252a..05c62e60b6 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql index ed4b863776..733ec43912 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql index e057084866..dc3cd87a0e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_grain_to_date__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql index 6480a7bdc2..7458902dd6 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Compute Metrics via Expressions SELECT subq_3.txn_revenue AS trailing_2_months_revenue diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql index 4a0d5baff3..09fc4701f7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_ds__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue',] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql index 6f7ad73a19..7946b6a193 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql index 05e48cdae3..eeb3c39cb1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql index 678f39d46a..5a77b82c8c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql index 95cd5a77bb..d00190e85d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql index 9599401b43..bced093beb 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql index 7d5604b836..23058246a7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_dimension__plan0.sql index 61ab896058..59813ec4bd 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql index 6fc2ff41b0..ea7822777b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql index b1734b6697..d9ac89c7d8 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql index 286f530a98..f1cf8e85bb 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql index ecfa72595a..8af7d9ac98 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql index c81dadb7e8..1e00823a96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'metric_time__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql index 3b86722112..158bedb176 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql index 82901603c1..93c8da88c8 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_default_grain__plan0.sql index f510f3df6a..dbcc2a7426 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql index 4f9ccb637e..45e77ce633 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql index 45b779624e..6f65091a35 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql index 4743faf42b..c59c01ed8b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_cumulative_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_cumulative_metric_with_non_default_grains__plan0.sql index 7a08f08ae3..3bbfb6685e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_cumulative_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_cumulative_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql index 64ef96c161..bc88b14a12 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grain__plan0.sql index 90e3176a58..a15c88a3ed 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql index 774caad966..284878999e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grains__plan0.sql index 306bf4946a..cac9393c39 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql index 6ab8a6d40c..01775c564e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grain__plan0.sql index 563fa96f91..6b9f6ec035 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grain__plan0_optimized.sql index af16e9d076..93de1954f8 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grains__plan0.sql index 9e0e39273c..fefffa46cc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_11.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grains__plan0_optimized.sql index 0de21ac7b8..c5ce42a77e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Databricks/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_all_time_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_all_time_metric_with_non_default_grains__plan0.sql index e18d6d8867..0d6633fb68 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_all_time_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_all_time_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_all_time_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_all_time_metric_with_non_default_grains__plan0_optimized.sql index 5150db08e3..7819f94d96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_all_time_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_all_time_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql index 1a2054d9f9..3633d1de11 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql index 76e8f3252a..05c62e60b6 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql index 1eb2b47b63..14113cbd48 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql index e057084866..dc3cd87a0e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_grain_to_date__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql index a25afde605..6cadf9002a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Compute Metrics via Expressions SELECT subq_3.txn_revenue AS trailing_2_months_revenue diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql index 4a0d5baff3..09fc4701f7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_ds__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue',] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql index 740c26e8b4..4d51249831 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql index 05e48cdae3..eeb3c39cb1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql index d940d9ce44..1d643c0145 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql index 95cd5a77bb..d00190e85d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql index a0296e5753..b9ba5d8640 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql index 55074544ae..c1d486c15b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_dimension__plan0.sql index 126f491236..4f1d818203 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql index 4719e4a5ff..529ab8726b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql index 4439195d94..0e172a1b42 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql index 33993634a7..b0cdcb3a42 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql index 27fb0b9e4e..a4a1c66fa1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql index 6026bfbbbe..4afdeeb9ed 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'metric_time__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql index 3c0912a7bd..cb2ec13b9b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql index 027bb2f596..177a1bf681 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_default_grain__plan0.sql index 1de175b2a7..b51176713a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql index 4f9ccb637e..45e77ce633 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql index e92f0c295f..dddb4020e5 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql index 36fd4f7c2c..5d8fb99f56 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_cumulative_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_cumulative_metric_with_non_default_grains__plan0.sql index 4bacd09f19..26da539133 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_cumulative_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_cumulative_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql index 6f4d9e39fb..50b3747f26 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grain__plan0.sql index 5c0cc6861f..aaf462644f 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql index 774caad966..284878999e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grains__plan0.sql index d2e514d119..8160652a4e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql index 6ab8a6d40c..01775c564e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grain__plan0.sql index 3436052379..b3a4ffea08 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grain__plan0_optimized.sql index 59c39cfceb..b7789174e0 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grains__plan0.sql index f02a95f7fc..299d44d340 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_11.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grains__plan0_optimized.sql index 61f2654313..6b0af06e55 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/DuckDB/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_all_time_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_all_time_metric_with_non_default_grains__plan0.sql index e18d6d8867..0d6633fb68 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_all_time_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_all_time_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_all_time_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_all_time_metric_with_non_default_grains__plan0_optimized.sql index 5150db08e3..7819f94d96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_all_time_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_all_time_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql index 1a2054d9f9..3633d1de11 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql index 76e8f3252a..05c62e60b6 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql index 1eb2b47b63..14113cbd48 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql index e057084866..dc3cd87a0e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_grain_to_date__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql index a25afde605..6cadf9002a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Compute Metrics via Expressions SELECT subq_3.txn_revenue AS trailing_2_months_revenue diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql index 4a0d5baff3..09fc4701f7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_ds__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue',] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql index 740c26e8b4..4d51249831 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql index 05e48cdae3..eeb3c39cb1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql index d940d9ce44..1d643c0145 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql index 95cd5a77bb..d00190e85d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql index 10b9060b34..ef231266fb 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql index cfba41e2c1..3cc7adf3e4 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_dimension__plan0.sql index 193901038d..da3612a713 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql index 5754f68089..1b5df5715d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql index f39d0687dc..ae7b94558a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql index 4a99efc660..621e083848 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql index 241af07cff..b9acbd45a1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql index e4903de984..758cde3d4e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'metric_time__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql index a2dd8a21e1..c5390c8a76 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql index 0b6dc47704..5cb3ae2513 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_default_grain__plan0.sql index 1de175b2a7..b51176713a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql index 4f9ccb637e..45e77ce633 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql index ad1284e5f9..862090596c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql index 9e47224fef..2ffb6051a7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_cumulative_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_cumulative_metric_with_non_default_grains__plan0.sql index e3b7882afe..a1e822bb76 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_cumulative_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_cumulative_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql index 399230aea6..a2cfc12667 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grain__plan0.sql index 5c0cc6861f..aaf462644f 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql index 774caad966..284878999e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grains__plan0.sql index d2e514d119..8160652a4e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql index 6ab8a6d40c..01775c564e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grain__plan0.sql index e67054deee..95171e5117 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grain__plan0_optimized.sql index d1687a1592..ec1a2d8015 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grains__plan0.sql index d10a11c213..da630d1300 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_11.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grains__plan0_optimized.sql index 9caba7b61e..c29d012a46 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Postgres/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_all_time_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_all_time_metric_with_non_default_grains__plan0.sql index 8cd8bf0b6a..a6b464318e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_all_time_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_all_time_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_all_time_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_all_time_metric_with_non_default_grains__plan0_optimized.sql index 5150db08e3..7819f94d96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_all_time_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_all_time_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql index 6d53edfbf7..51effbe22d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql index 76e8f3252a..05c62e60b6 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql index af5c13d2d1..eeccc3d9bc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql index e057084866..dc3cd87a0e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_grain_to_date__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql index fac3a06899..05321cc68f 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Compute Metrics via Expressions SELECT subq_3.txn_revenue AS trailing_2_months_revenue diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql index 4a0d5baff3..09fc4701f7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_ds__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue',] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql index 01673301ff..17a4a3356a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql index 05e48cdae3..eeb3c39cb1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql index 8ea5031611..6c485b744d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql index 95cd5a77bb..d00190e85d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql index 2cdb297db6..481385daa6 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql index 7d5604b836..23058246a7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_dimension__plan0.sql index 4be662b66d..08697de51d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql index 6fc2ff41b0..ea7822777b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql index 99aa8df844..0abdf03ad3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql index 286f530a98..f1cf8e85bb 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql index 8902359444..344017966b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql index c81dadb7e8..1e00823a96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'metric_time__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql index 42ab20d4b7..312b3ce6bb 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql index 82901603c1..93c8da88c8 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_default_grain__plan0.sql index fcb0ecf1eb..df0c2f8ae8 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql index 4f9ccb637e..45e77ce633 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql index 5cca84c02a..8bf9164b3c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql index 4743faf42b..c59c01ed8b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_cumulative_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_cumulative_metric_with_non_default_grains__plan0.sql index 399b6d8bc6..69d8a1e37c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_cumulative_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_cumulative_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql index 64ef96c161..bc88b14a12 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grain__plan0.sql index 431f05d88c..d514e95368 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql index 774caad966..284878999e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grains__plan0.sql index 3ba46e1c92..8da8ed8704 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql index 6ab8a6d40c..01775c564e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grain__plan0.sql index bcc30b8c54..5a6c264f24 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grain__plan0_optimized.sql index af16e9d076..93de1954f8 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grains__plan0.sql index 4023666160..cc07c8295b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_11.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grains__plan0_optimized.sql index 0de21ac7b8..c5ce42a77e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Redshift/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_all_time_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_all_time_metric_with_non_default_grains__plan0.sql index 4a3da9081b..8b390d4dcf 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_all_time_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_all_time_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_all_time_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_all_time_metric_with_non_default_grains__plan0_optimized.sql index 5150db08e3..7819f94d96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_all_time_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_all_time_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql index aefede8679..028689f2fa 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql index 76e8f3252a..05c62e60b6 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql index af80e547c1..6408363100 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql index e057084866..dc3cd87a0e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_grain_to_date__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql index a67aca0cbf..0f0c50e946 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Compute Metrics via Expressions SELECT subq_3.txn_revenue AS trailing_2_months_revenue diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql index 4a0d5baff3..09fc4701f7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_ds__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue',] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql index 4232fc4d32..e8393c8df3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql index 05e48cdae3..eeb3c39cb1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql index 7d58e6c138..1c867f44f3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql index 95cd5a77bb..d00190e85d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql index df5c02ee19..4fe475cefa 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql index 7d5604b836..23058246a7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_dimension__plan0.sql index 9eb08b31fe..127e4d21de 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql index 6fc2ff41b0..ea7822777b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql index 502dd06109..17a0bfff7a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql index 286f530a98..f1cf8e85bb 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql index 1ccb132272..323a7870af 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql index c81dadb7e8..1e00823a96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'metric_time__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql index d5fe0c4cad..9a8468a59c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql index 82901603c1..93c8da88c8 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_default_grain__plan0.sql index c73dbfd71f..d55939f6de 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql index 4f9ccb637e..45e77ce633 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql index 65c43cc611..d8e3c21e84 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql index 4743faf42b..c59c01ed8b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_cumulative_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_cumulative_metric_with_non_default_grains__plan0.sql index 52cd998690..85621e4604 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_cumulative_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_cumulative_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql index 64ef96c161..bc88b14a12 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grain__plan0.sql index a09f53583d..10f7f81e50 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql index 774caad966..284878999e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grains__plan0.sql index 1ef3533096..35998d352e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql index 6ab8a6d40c..01775c564e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grain__plan0.sql index 1b541aa7f7..f60e1aa862 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grain__plan0_optimized.sql index af16e9d076..93de1954f8 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grains__plan0.sql index cada9c1b77..92799c82e7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_11.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grains__plan0_optimized.sql index 0de21ac7b8..c5ce42a77e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Snowflake/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_all_time_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_all_time_metric_with_non_default_grains__plan0.sql index d460000bb4..c5e488717d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_all_time_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_all_time_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_all_time_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_all_time_metric_with_non_default_grains__plan0_optimized.sql index 5150db08e3..7819f94d96 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_all_time_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_all_time_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_all_time_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grains. + + Uses only metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric__plan0.sql index c8c4b8c517..cbdf568f7b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric__plan0_optimized.sql index 76e8f3252a..05c62e60b6 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a basic cumulative metric query. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_grain_to_date__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_grain_to_date__plan0.sql index ff42ad67df..a9138d331a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_grain_to_date__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_grain_to_date__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_grain_to_date__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_grain_to_date__plan0_optimized.sql index e057084866..dc3cd87a0e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_grain_to_date__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_grain_to_date__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_grain_to_date +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query against a grain_to_date cumulative metric. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_ds__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_ds__plan0.sql index 72c916e0ad..f958adfb93 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_ds__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_ds__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Compute Metrics via Expressions SELECT subq_3.txn_revenue AS trailing_2_months_revenue diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_ds__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_ds__plan0_optimized.sql index 4a0d5baff3..09fc4701f7 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_ds__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_ds__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_ds +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric with no time dimension specified. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue',] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window__plan0.sql index e1a8f1b87e..53435c35c0 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Compute Metrics via Expressions SELECT subq_3.ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window__plan0_optimized.sql index 05e48cdae3..eeb3c39cb1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query where there is a windowless cumulative metric to compute. +--- -- Read Elements From Semantic Model 'revenue' -- Metric Time Dimension 'ds' -- Pass Only Elements: ['txn_revenue', 'ds__month'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window_with_time_constraint__plan0.sql index e930d1463c..d296ec4549 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window_with_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql index eab1fc1814..67f13db99d 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_no_window_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_no_window_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a windowless cumulative metric query with an adjustable time constraint. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql index a0fe897b26..23063d3005 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql index b9c7a738fe..93604b49f1 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_and_metric_time +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with one agg time dimension and one metric time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_dimension__plan0.sql index cfce01690b..950701f51c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql index b4beca7e7f..52931707eb 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_agg_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_agg_time_dimension +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with agg time dimension. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql index 0eb84051a7..a6f9e1c220 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.revenue_instance__ds__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql index 68a852e450..c1185a7f4f 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_agg_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_agg_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple agg time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'revenue_instance__ds__day', 'revenue_instance__ds__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql index 52db65a0af..61d7688df5 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql index 26a51cc775..d27e424ea2 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_multiple_metric_time_dimensions__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_multiple_metric_time_dimensions +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative metric queried with multiple metric time dimensions. +--- -- Join Self Over Time Range -- Pass Only Elements: ['txn_revenue', 'metric_time__day', 'metric_time__month'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql index 3c00149d8a..93d8b41386 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_adjustable_time_filter__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql index 47ec39dda7..61ea39cbbc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_adjustable_time_filter__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_non_adjustable_time_filter +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with a time filter that cannot be automatically adjusted. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric. When we do not have an adjustable time filter we must include all + input data in order to ensure the cumulative metric is correct. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_default_grain__plan0.sql index e35cb4930b..75461c436b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql index 4f9ccb637e..45e77ce633 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative all-time metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_time_constraint__plan0.sql index 3356983516..941e46b5e2 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_time_constraint__plan0.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_time_constraint__plan0_optimized.sql index 997aa05a5d..0ebb539053 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,12 @@ +test_name: test_cumulative_metric_with_time_constraint +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a cumulative metric query with an adjustable time constraint. + + Not all query inputs with time constraint filters allow us to adjust the time constraint to include the full + span of input data for a cumulative metric, but when we receive a time constraint filter expression we can + automatically adjust it should render a query similar to this one. +--- -- Join Self Over Time Range -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-01T00:00:00] -- Pass Only Elements: ['txn_revenue', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_derived_cumulative_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_derived_cumulative_metric_with_non_default_grains__plan0.sql index 33a9a748d5..091068932c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_derived_cumulative_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_derived_cumulative_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql index 6505377193..c32b803542 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_derived_cumulative_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default grains. +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grain__plan0.sql index af32d922f6..3531ad841f 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql index 774caad966..284878999e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grains__plan0.sql index 0ff02ff3bd..75be8094e4 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql index 6ab8a6d40c..01775c564e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_grain_to_date_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_grain_to_date_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative grain to date metric queried with non-default grains. + + Uses agg time dimension instead of metric_time. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT revenue_instance__ds__quarter diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grain__plan0.sql index 4761087980..dce9104eff 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_8.metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grain__plan0_optimized.sql index d45985174c..51a417b9ce 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_window_metric_with_non_default_grain +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grains__plan0.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grains__plan0.sql index db86eeb24e..4cc8d5daca 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grains__plan0.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grains__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT subq_11.metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grains__plan0_optimized.sql b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grains__plan0_optimized.sql index 6beb477bc0..be601579ec 100644 --- a/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grains__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_cumulative_metric_rendering.py/SqlQueryPlan/Trino/test_window_metric_with_non_default_grains__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_window_metric_with_non_default_grains +test_filename: test_cumulative_metric_rendering.py +docstring: + Tests rendering a query for a cumulative window metric queried with non-default grains. + + Uses both metric_time and agg_time_dimension. Excludes default grain. +--- -- Re-aggregate Metric via Group By SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 147b09a352..39b897706a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_adjustable_filter +test_filename: test_cumulative_metrics.py +docstring: + Tests a cumulative metric with a filter that cannot be adjusted to ensure all data is included. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-03-15T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt index 7d44fb1284..91e85d02d3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a month to date cumulative metric with a constraint to ensure all necessary input data is included. +--- metric_time__day revenue_mtd ------------------- ------------- 2021-01-03T00:00:00 3000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt index c3c09258c1..e92c6458dc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_multiple_cumulative_metrics__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_multiple_cumulative_metrics +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with multiple cumulative metrics to ensure date selections align. +--- metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- 2020-03-31T00:00:00 8000 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt index 3ef788b572..641ab6577c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_non_additive_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_non_additive_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with a non-additive cumulative metric to ensure the non-additive constraint is applied. +--- metric_time__day every_two_days_bookers ------------------- ------------------------ 2020-01-01T00:00:00 3 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt index c42416a36e..bc6799521b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/BigQuery/test_simple_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_simple_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query of a cumulative metric with a monthly window and a time constraint adjustment. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-02-01T00:00:00 5000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 147b09a352..39b897706a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_adjustable_filter +test_filename: test_cumulative_metrics.py +docstring: + Tests a cumulative metric with a filter that cannot be adjusted to ensure all data is included. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-03-15T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt index 7d44fb1284..91e85d02d3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a month to date cumulative metric with a constraint to ensure all necessary input data is included. +--- metric_time__day revenue_mtd ------------------- ------------- 2021-01-03T00:00:00 3000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt index c3c09258c1..e92c6458dc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_multiple_cumulative_metrics__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_multiple_cumulative_metrics +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with multiple cumulative metrics to ensure date selections align. +--- metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- 2020-03-31T00:00:00 8000 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt index 3ef788b572..641ab6577c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_non_additive_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_non_additive_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with a non-additive cumulative metric to ensure the non-additive constraint is applied. +--- metric_time__day every_two_days_bookers ------------------- ------------------------ 2020-01-01T00:00:00 3 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt index c42416a36e..bc6799521b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Databricks/test_simple_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_simple_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query of a cumulative metric with a monthly window and a time constraint adjustment. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-02-01T00:00:00 5000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 147b09a352..39b897706a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_adjustable_filter +test_filename: test_cumulative_metrics.py +docstring: + Tests a cumulative metric with a filter that cannot be adjusted to ensure all data is included. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-03-15T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt index 7d44fb1284..91e85d02d3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a month to date cumulative metric with a constraint to ensure all necessary input data is included. +--- metric_time__day revenue_mtd ------------------- ------------- 2021-01-03T00:00:00 3000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt index c3c09258c1..e92c6458dc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_multiple_cumulative_metrics__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_multiple_cumulative_metrics +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with multiple cumulative metrics to ensure date selections align. +--- metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- 2020-03-31T00:00:00 8000 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt index 3ef788b572..641ab6577c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_non_additive_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_non_additive_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with a non-additive cumulative metric to ensure the non-additive constraint is applied. +--- metric_time__day every_two_days_bookers ------------------- ------------------------ 2020-01-01T00:00:00 3 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt index c42416a36e..bc6799521b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/DuckDB/test_simple_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_simple_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query of a cumulative metric with a monthly window and a time constraint adjustment. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-02-01T00:00:00 5000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 147b09a352..39b897706a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_adjustable_filter +test_filename: test_cumulative_metrics.py +docstring: + Tests a cumulative metric with a filter that cannot be adjusted to ensure all data is included. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-03-15T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt index 7d44fb1284..91e85d02d3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a month to date cumulative metric with a constraint to ensure all necessary input data is included. +--- metric_time__day revenue_mtd ------------------- ------------- 2021-01-03T00:00:00 3000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt index c3c09258c1..e92c6458dc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_multiple_cumulative_metrics__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_multiple_cumulative_metrics +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with multiple cumulative metrics to ensure date selections align. +--- metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- 2020-03-31T00:00:00 8000 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt index 3ef788b572..641ab6577c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_non_additive_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_non_additive_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with a non-additive cumulative metric to ensure the non-additive constraint is applied. +--- metric_time__day every_two_days_bookers ------------------- ------------------------ 2020-01-01T00:00:00 3 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt index c42416a36e..bc6799521b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Postgres/test_simple_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_simple_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query of a cumulative metric with a monthly window and a time constraint adjustment. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-02-01T00:00:00 5000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 147b09a352..39b897706a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_adjustable_filter +test_filename: test_cumulative_metrics.py +docstring: + Tests a cumulative metric with a filter that cannot be adjusted to ensure all data is included. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-03-15T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt index 7d44fb1284..91e85d02d3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a month to date cumulative metric with a constraint to ensure all necessary input data is included. +--- metric_time__day revenue_mtd ------------------- ------------- 2021-01-03T00:00:00 3000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt index c3c09258c1..e92c6458dc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_multiple_cumulative_metrics__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_multiple_cumulative_metrics +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with multiple cumulative metrics to ensure date selections align. +--- metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- 2020-03-31T00:00:00 8000 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt index 3ef788b572..641ab6577c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_non_additive_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_non_additive_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with a non-additive cumulative metric to ensure the non-additive constraint is applied. +--- metric_time__day every_two_days_bookers ------------------- ------------------------ 2020-01-01T00:00:00 3 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt index c42416a36e..bc6799521b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Redshift/test_simple_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_simple_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query of a cumulative metric with a monthly window and a time constraint adjustment. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-02-01T00:00:00 5000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 14e167761d..61171c6c3e 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_adjustable_filter +test_filename: test_cumulative_metrics.py +docstring: + Tests a cumulative metric with a filter that cannot be adjusted to ensure all data is included. +--- METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE ------------------- --------------------------- 2020-03-15T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt index 7eb99e5572..20c26035b9 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a month to date cumulative metric with a constraint to ensure all necessary input data is included. +--- METRIC_TIME__DAY REVENUE_MTD ------------------- ------------- 2021-01-03T00:00:00 3000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt index 42e941e275..a3a1279d79 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_multiple_cumulative_metrics__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_multiple_cumulative_metrics +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with multiple cumulative metrics to ensure date selections align. +--- METRIC_TIME__DAY REVENUE_ALL_TIME TRAILING_2_MONTHS_REVENUE ------------------- ------------------ --------------------------- 2020-03-31T00:00:00 8000 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt index 70d2042561..7c341dd912 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_non_additive_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_non_additive_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with a non-additive cumulative metric to ensure the non-additive constraint is applied. +--- METRIC_TIME__DAY EVERY_TWO_DAYS_BOOKERS ------------------- ------------------------ 2020-01-01T00:00:00 3 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt index d047459452..72d424362c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Snowflake/test_simple_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_simple_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query of a cumulative metric with a monthly window and a time constraint adjustment. +--- METRIC_TIME__DAY TRAILING_2_MONTHS_REVENUE ------------------- --------------------------- 2020-02-01T00:00:00 5000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt index 147b09a352..39b897706a 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_cumulative_metric_with_non_adjustable_filter__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_adjustable_filter +test_filename: test_cumulative_metrics.py +docstring: + Tests a cumulative metric with a filter that cannot be adjusted to ensure all data is included. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-03-15T00:00:00 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt index 7d44fb1284..91e85d02d3 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_grain_to_date_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_grain_to_date_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a month to date cumulative metric with a constraint to ensure all necessary input data is included. +--- metric_time__day revenue_mtd ------------------- ------------- 2021-01-03T00:00:00 3000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt index c3c09258c1..e92c6458dc 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_multiple_cumulative_metrics__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_multiple_cumulative_metrics +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with multiple cumulative metrics to ensure date selections align. +--- metric_time__day revenue_all_time trailing_2_months_revenue ------------------- ------------------ --------------------------- 2020-03-31T00:00:00 8000 7000 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt index 3ef788b572..641ab6577c 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_non_additive_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_non_additive_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query with a non-additive cumulative metric to ensure the non-additive constraint is applied. +--- metric_time__day every_two_days_bookers ------------------- ------------------------ 2020-01-01T00:00:00 3 diff --git a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt index c42416a36e..bc6799521b 100644 --- a/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt +++ b/tests_metricflow/snapshots/test_cumulative_metrics.py/str/Trino/test_simple_cumulative_metric__query_output.txt @@ -1,3 +1,8 @@ +test_name: test_simple_cumulative_metric +test_filename: test_cumulative_metrics.py +docstring: + Tests a query of a cumulative metric with a monthly window and a time constraint adjustment. +--- metric_time__day trailing_2_months_revenue ------------------- --------------------------- 2020-02-01T00:00:00 5000 diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity__plan0.sql index 33874d3246..f725260e60 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity__plan0_optimized.sql index 5a1e87e48b..0845e754a2 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter__plan0.sql index e4755407bc..77f74609a5 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql index e35b9482d9..0432d642d0 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 004d675b99..ab0ca187b3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_18.buys AS FLOAT64) / CAST(NULLIF(subq_18.visits, 0) AS FLOAT64) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index f84bb2c2ac..a81adf3577 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_custom_granularity__plan0.sql index 4d95e26769..6849e97a18 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT subq_9.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql index b642dbbd73..a2c8198c2f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_derived_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_derived_metric_with_custom_granularity__plan0.sql index 7a2d4eb72c..951f4444d6 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_derived_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_derived_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_12.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_derived_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_derived_metric_with_custom_granularity__plan0_optimized.sql index 51b05a38ec..5f1b32150d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_derived_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_derived_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index 3ce3c595b8..a50d5ba704 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql index bf491a9c8c..f11f90cf9d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 7ba592ec83..b716fbd564 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index eea2d8665d..28fcaedf7e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['listings', 'metric_time__martian_day', 'listing__ds__month'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_multiple_metrics_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_multiple_metrics_with_custom_granularity__plan0.sql index fec26bde21..b221ae3f06 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_multiple_metrics_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_multiple_metrics_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__martian_day, subq_11.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql index ec46182df0..6a72874205 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_17.metric_time__martian_day, subq_23.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 22ead24ff1..7c5fcaccb2 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__day', 'metric_time__martian_day', 'user__bio_added_ts__martian_day', 'user__bio_added_ts__month'] SELECT subq_6.user__bio_added_ts__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index ef952dadeb..6b018d35a2 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Join to Custom Granularity Dataset diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0.sql index fbd38d9bc3..de7c315170 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__martian_day',] SELECT subq_2.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index 65fa31ad37..ed9f88d087 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['metric_time__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_non_metric_time__plan0.sql index 36bcef7005..8a2f2d13aa 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['booking__ds__martian_day',] SELECT subq_1.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql index 289c1f097a..4839fa171c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Read Elements From Semantic Model 'bookings_source' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['booking__ds__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_filter__plan0.sql index 93c91c9a83..f9f6eeb730 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Pass Only Elements: ['listing__ds__day',] SELECT subq_2.listing__ds__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql index a9ab30f907..4c20443426 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql index 7a2e9b6657..66947a03aa 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Pass Only Elements: ['listing__ds__martian_day',] SELECT subq_2.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index fc9f6e0953..ce247796e1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__martian_day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity__plan0.sql index d2972ba7a4..2e6c62e68d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity__plan0_optimized.sql index d906db67ff..9729d5a228 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index e7f68c5d33..2a18fddf93 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 5f9559f913..f093c0f267 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity__plan0.sql index 48bb23dd1b..2eea050802 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity__plan0_optimized.sql index ed3b100a18..5c2a9e7727 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'booking__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0.sql index fe257d1e47..5cf2449b63 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql index 3083f4cb9a..14f5321989 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_filter__plan0.sql index 50140af38e..147d3b5aff 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.bookings diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql index a3c6d55031..20f303a1e5 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql index e575d0735f..9bf23cdda6 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index e2b0691009..029aa9fbb1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__martian_day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql index a0052acfab..7192e2c19a 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Compute Metrics via Expressions SELECT subq_12.listing__user__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql index c1d597284a..0edff138f1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/BigQuery/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__user__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity__plan0.sql index c50e43a2be..8a9c724e07 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity__plan0_optimized.sql index 1727263c01..6e6237f85f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter__plan0.sql index 18e65b327b..6614464e8f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql index 88bf6868bf..94b9ee3e34 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 6e31826903..139ff3161d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_18.buys AS DOUBLE) / CAST(NULLIF(subq_18.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 1b55441cf6..70ef7eee07 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_custom_granularity__plan0.sql index 46cf1d0b82..4dfb81b76a 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT subq_9.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql index 97db43cbe1..5083638fbd 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_derived_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_derived_metric_with_custom_granularity__plan0.sql index 60689b5662..ff40f5fcb6 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_derived_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_derived_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_12.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_derived_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_derived_metric_with_custom_granularity__plan0_optimized.sql index d315d358a7..291ffa6f57 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_derived_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_derived_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index ad5cc12383..a8b73b2a4a 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql index 2d94e630dd..c5fdcfc118 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index da0f432abe..3c92985721 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 091f68a2c1..9a4fa054fc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['listings', 'metric_time__martian_day', 'listing__ds__month'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_multiple_metrics_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_multiple_metrics_with_custom_granularity__plan0.sql index 551f54105c..7e1e5e90a1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_multiple_metrics_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_multiple_metrics_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__martian_day, subq_11.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql index ae8868ac3d..e67f5c3902 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_17.metric_time__martian_day, subq_23.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 343f194d98..d7451ddee2 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__day', 'metric_time__martian_day', 'user__bio_added_ts__martian_day', 'user__bio_added_ts__month'] SELECT subq_6.user__bio_added_ts__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index f4cb2ff0cf..e11e6a8784 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Join to Custom Granularity Dataset diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0.sql index 6375387070..7db7458586 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__martian_day',] SELECT subq_2.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index cb56b24088..42bc30855f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['metric_time__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_non_metric_time__plan0.sql index 87ccfed6cd..177a091e5e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['booking__ds__martian_day',] SELECT subq_1.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql index d800e789e7..73e96c218d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Read Elements From Semantic Model 'bookings_source' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['booking__ds__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_filter__plan0.sql index 59290a4859..9e172881b3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Pass Only Elements: ['listing__ds__day',] SELECT subq_2.listing__ds__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql index bce724a864..967bfd2894 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql index f6725def01..8995fc42fb 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Pass Only Elements: ['listing__ds__martian_day',] SELECT subq_2.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index 3dd32191d6..ee15867d33 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__martian_day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity__plan0.sql index 6e94458011..60d4b21664 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity__plan0_optimized.sql index 0be3ead6fd..c964b31659 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index af4ab5dc6a..b2948e9c16 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 21e34e9859..a067aa9f7b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity__plan0.sql index a3ffa65c48..45bcfc5fd6 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity__plan0_optimized.sql index ec04bb54d3..0ee1f90d6d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'booking__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0.sql index bc330bc00c..2719b9100b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql index 3b149b39b6..18fe09909f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_filter__plan0.sql index eb23de5d49..fae460520d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.bookings diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql index 1ea0cb2615..5d5f3a5077 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql index ac9d44d80b..938cb0a46c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index e5498b173a..f21b64dae8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__martian_day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql index c0d7582135..5e8f6fd2f4 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Compute Metrics via Expressions SELECT subq_12.listing__user__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql index 71414f4240..b608ef8175 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Databricks/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__user__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity__plan0.sql index 34213e0ec0..3870c819a9 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity__plan0_optimized.sql index cfc208d77a..67e2bba002 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter__plan0.sql index 0f2f52b058..57f5e1a54e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql index e66b1cde1a..c52ecf2813 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index b8e7db4e56..53de07abc8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_18.buys AS DOUBLE) / CAST(NULLIF(subq_18.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 39dabbab4d..1f9b50dbcc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_custom_granularity__plan0.sql index cd0e7b6533..82042a9884 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT subq_9.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql index cca87b18e0..4aa690a7d5 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_derived_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_derived_metric_with_custom_granularity__plan0.sql index 6951b18cc0..a2dfaabf8f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_derived_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_derived_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_12.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_derived_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_derived_metric_with_custom_granularity__plan0_optimized.sql index d315d358a7..291ffa6f57 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_derived_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_derived_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index c90194eb42..229a3afc1c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql index 2d94e630dd..c5fdcfc118 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 3cf7bfb112..d92b1c497f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 091f68a2c1..9a4fa054fc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['listings', 'metric_time__martian_day', 'listing__ds__month'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_multiple_metrics_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_multiple_metrics_with_custom_granularity__plan0.sql index 0e9a6340b4..ee6315490e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_multiple_metrics_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_multiple_metrics_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__martian_day, subq_11.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql index ae8868ac3d..e67f5c3902 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_17.metric_time__martian_day, subq_23.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 5cf61b70ac..45d63b1eef 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__day', 'metric_time__martian_day', 'user__bio_added_ts__martian_day', 'user__bio_added_ts__month'] SELECT subq_6.user__bio_added_ts__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index f4cb2ff0cf..e11e6a8784 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Join to Custom Granularity Dataset diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_metric_time__plan0.sql index 48672d84f6..141aa6fe84 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__martian_day',] SELECT subq_2.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index cb56b24088..42bc30855f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['metric_time__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_non_metric_time__plan0.sql index 7d3bcb3d0c..72513e67c3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['booking__ds__martian_day',] SELECT subq_1.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql index d800e789e7..73e96c218d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Read Elements From Semantic Model 'bookings_source' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['booking__ds__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_filter__plan0.sql index 05a7977e3d..4ef5844e13 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Pass Only Elements: ['listing__ds__day',] SELECT subq_2.listing__ds__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql index bce724a864..967bfd2894 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql index 062e6d8cbe..1cbe2f51f6 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Pass Only Elements: ['listing__ds__martian_day',] SELECT subq_2.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index 3dd32191d6..ee15867d33 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__martian_day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity__plan0.sql index 0d0eb24d9e..e71daf37c9 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity__plan0_optimized.sql index f0fe852856..160f371d00 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 4314e07a28..1a9320f76e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index c392f92d50..ca56bb1679 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity__plan0.sql index ad4f7f44b1..2e673976b1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity__plan0_optimized.sql index ec04bb54d3..0ee1f90d6d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'booking__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_and_join__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_and_join__plan0.sql index 82252cdf25..3d385af20a 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_and_join__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_and_join__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql index 3b149b39b6..18fe09909f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_filter__plan0.sql index 1de9d4b282..16aed43cd8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.bookings diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql index 1ea0cb2615..5d5f3a5077 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql index 410c6f8b17..767754d8ec 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index e5498b173a..f21b64dae8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__martian_day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql index 425a534ec2..b2ce5a6cde 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Compute Metrics via Expressions SELECT subq_12.listing__user__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql index 71414f4240..b608ef8175 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/DuckDB/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__user__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity__plan0.sql index 8eb3bf50af..0a7a37ad55 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity__plan0_optimized.sql index 7cf0facf82..c22230fdac 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter__plan0.sql index 78536a0114..57fdc67ad1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql index b86ae8bd00..575fd0f88c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index f56bc259b5..35f606eb24 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_18.buys AS DOUBLE PRECISION) / CAST(NULLIF(subq_18.visits, 0) AS DOUBLE PRECISION) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 22c9b077d0..f6a9e3c997 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_custom_granularity__plan0.sql index 57e51da490..e3f5cd14a3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT subq_9.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql index 8d627ad694..70f7674ffd 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_derived_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_derived_metric_with_custom_granularity__plan0.sql index 6951b18cc0..a2dfaabf8f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_derived_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_derived_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_12.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_derived_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_derived_metric_with_custom_granularity__plan0_optimized.sql index d315d358a7..291ffa6f57 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_derived_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_derived_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index c90194eb42..229a3afc1c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql index 2d94e630dd..c5fdcfc118 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 3cf7bfb112..d92b1c497f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 091f68a2c1..9a4fa054fc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['listings', 'metric_time__martian_day', 'listing__ds__month'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_multiple_metrics_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_multiple_metrics_with_custom_granularity__plan0.sql index 0e9a6340b4..ee6315490e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_multiple_metrics_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_multiple_metrics_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__martian_day, subq_11.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql index ae8868ac3d..e67f5c3902 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_17.metric_time__martian_day, subq_23.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 5cf61b70ac..45d63b1eef 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__day', 'metric_time__martian_day', 'user__bio_added_ts__martian_day', 'user__bio_added_ts__month'] SELECT subq_6.user__bio_added_ts__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index f4cb2ff0cf..e11e6a8784 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Join to Custom Granularity Dataset diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0.sql index 48672d84f6..141aa6fe84 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__martian_day',] SELECT subq_2.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index cb56b24088..42bc30855f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['metric_time__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_non_metric_time__plan0.sql index 7d3bcb3d0c..72513e67c3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['booking__ds__martian_day',] SELECT subq_1.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql index d800e789e7..73e96c218d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Read Elements From Semantic Model 'bookings_source' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['booking__ds__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_filter__plan0.sql index 05a7977e3d..4ef5844e13 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Pass Only Elements: ['listing__ds__day',] SELECT subq_2.listing__ds__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql index bce724a864..967bfd2894 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql index 062e6d8cbe..1cbe2f51f6 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Pass Only Elements: ['listing__ds__martian_day',] SELECT subq_2.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index 3dd32191d6..ee15867d33 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__martian_day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity__plan0.sql index ce8c276468..2b5f37ba07 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity__plan0_optimized.sql index 1d4e27cb31..2909f93dbc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 7fd92494d5..5d7e527ffc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 66261a43aa..4f91818971 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity__plan0.sql index ad4f7f44b1..2e673976b1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity__plan0_optimized.sql index ec04bb54d3..0ee1f90d6d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'booking__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0.sql index 82252cdf25..3d385af20a 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql index 3b149b39b6..18fe09909f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_filter__plan0.sql index 1de9d4b282..16aed43cd8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.bookings diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql index 1ea0cb2615..5d5f3a5077 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql index 410c6f8b17..767754d8ec 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index e5498b173a..f21b64dae8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__martian_day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql index 425a534ec2..b2ce5a6cde 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Compute Metrics via Expressions SELECT subq_12.listing__user__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql index 71414f4240..b608ef8175 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Postgres/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__user__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity__plan0.sql index 34f4c04af3..9e395ec027 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity__plan0_optimized.sql index 654613309a..4fedb3de24 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter__plan0.sql index 3ff7f74f2e..94265783d1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql index 3ef52f297e..9772af70cd 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index aad4f74e6d..3fa2945c0c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_18.buys AS DOUBLE PRECISION) / CAST(NULLIF(subq_18.visits, 0) AS DOUBLE PRECISION) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index e43d7fa3d5..3b9ed0713b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_custom_granularity__plan0.sql index d6394d42d6..c58f7269fd 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT subq_9.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql index 97db43cbe1..5083638fbd 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_derived_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_derived_metric_with_custom_granularity__plan0.sql index 047339cca7..52faa72664 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_derived_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_derived_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_12.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_derived_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_derived_metric_with_custom_granularity__plan0_optimized.sql index d315d358a7..291ffa6f57 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_derived_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_derived_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index 53b4a9f53c..9a71929650 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql index 2d94e630dd..c5fdcfc118 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 66fe555ba8..5d9ac41f97 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 091f68a2c1..9a4fa054fc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['listings', 'metric_time__martian_day', 'listing__ds__month'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_multiple_metrics_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_multiple_metrics_with_custom_granularity__plan0.sql index 33e0021df0..9dc525184d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_multiple_metrics_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_multiple_metrics_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__martian_day, subq_11.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql index ae8868ac3d..e67f5c3902 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_17.metric_time__martian_day, subq_23.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 73a5ac4bc5..7549c69af9 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__day', 'metric_time__martian_day', 'user__bio_added_ts__martian_day', 'user__bio_added_ts__month'] SELECT subq_6.user__bio_added_ts__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index f4cb2ff0cf..e11e6a8784 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Join to Custom Granularity Dataset diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0.sql index 6b9cde8390..33ab31a91d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__martian_day',] SELECT subq_2.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index cb56b24088..42bc30855f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['metric_time__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_non_metric_time__plan0.sql index df8f5ba7fd..da079acc23 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['booking__ds__martian_day',] SELECT subq_1.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql index d800e789e7..73e96c218d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Read Elements From Semantic Model 'bookings_source' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['booking__ds__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_filter__plan0.sql index 9a4c804ec1..a240444280 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Pass Only Elements: ['listing__ds__day',] SELECT subq_2.listing__ds__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql index bce724a864..967bfd2894 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql index d45a73f563..eaee609397 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Pass Only Elements: ['listing__ds__martian_day',] SELECT subq_2.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index 3dd32191d6..ee15867d33 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__martian_day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity__plan0.sql index 6145555ea9..a0f0d02f8b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity__plan0_optimized.sql index 0be3ead6fd..c964b31659 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index f83f81e566..070a94df0a 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 21e34e9859..a067aa9f7b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity__plan0.sql index 6f01995df0..2da3e077c9 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity__plan0_optimized.sql index ec04bb54d3..0ee1f90d6d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'booking__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0.sql index 2bf7695c9e..4f888f4532 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql index 3b149b39b6..18fe09909f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_filter__plan0.sql index 14237537a2..a4428ca997 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.bookings diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql index 1ea0cb2615..5d5f3a5077 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql index 727d7e4821..3ba4b38dda 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index e5498b173a..f21b64dae8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__martian_day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql index b640afd262..65dc54bcc3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Compute Metrics via Expressions SELECT subq_12.listing__user__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql index 71414f4240..b608ef8175 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Redshift/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__user__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity__plan0.sql index 7cadc04f82..018bd5a98f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity__plan0_optimized.sql index 3667037821..3c4064b5bf 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter__plan0.sql index a405713651..5bcc35c51b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql index 3f18a22c30..d8c531b052 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 3200d08d20..6f720ef21d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_18.buys AS DOUBLE) / CAST(NULLIF(subq_18.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 7dd5cf633f..d628b5d1f5 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_custom_granularity__plan0.sql index fc080d2b2b..a35ca0e1b3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT subq_9.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql index 97db43cbe1..5083638fbd 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_derived_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_derived_metric_with_custom_granularity__plan0.sql index 8855dbdf75..ac3b63c4a8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_derived_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_derived_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_12.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_derived_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_derived_metric_with_custom_granularity__plan0_optimized.sql index d315d358a7..291ffa6f57 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_derived_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_derived_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index 2b5686b56c..f558fb78ee 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql index 2d94e630dd..c5fdcfc118 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index af6e1e066a..9db3fc28f8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 091f68a2c1..9a4fa054fc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['listings', 'metric_time__martian_day', 'listing__ds__month'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_multiple_metrics_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_multiple_metrics_with_custom_granularity__plan0.sql index 8c14590c1d..75174f7e7e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_multiple_metrics_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_multiple_metrics_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__martian_day, subq_11.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql index ae8868ac3d..e67f5c3902 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_17.metric_time__martian_day, subq_23.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index b563ac067a..c1a3d317e1 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__day', 'metric_time__martian_day', 'user__bio_added_ts__martian_day', 'user__bio_added_ts__month'] SELECT subq_6.user__bio_added_ts__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index f4cb2ff0cf..e11e6a8784 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Join to Custom Granularity Dataset diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0.sql index c4487693ae..4eda0edf0d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__martian_day',] SELECT subq_2.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index cb56b24088..42bc30855f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['metric_time__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_non_metric_time__plan0.sql index 928d0395d5..5c9656b421 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['booking__ds__martian_day',] SELECT subq_1.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql index d800e789e7..73e96c218d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Read Elements From Semantic Model 'bookings_source' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['booking__ds__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_filter__plan0.sql index 1fe1af2d0e..084d112fcf 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Pass Only Elements: ['listing__ds__day',] SELECT subq_2.listing__ds__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql index bce724a864..967bfd2894 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql index cf62168517..3570c4bc7e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Pass Only Elements: ['listing__ds__martian_day',] SELECT subq_2.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index 3dd32191d6..ee15867d33 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__martian_day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity__plan0.sql index 33884df184..90c4527954 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity__plan0_optimized.sql index 0be3ead6fd..c964b31659 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index 1f100667aa..4ae584870d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 21e34e9859..a067aa9f7b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity__plan0.sql index f19923702d..a5b40cf99f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity__plan0_optimized.sql index ec04bb54d3..0ee1f90d6d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'booking__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_and_join__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_and_join__plan0.sql index 499c49a210..f3bcb5236b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_and_join__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_and_join__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql index 3b149b39b6..18fe09909f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_filter__plan0.sql index cd913b6941..a2c304876f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.bookings diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql index 1ea0cb2615..5d5f3a5077 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql index 9da445f83f..823c4b061c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index e5498b173a..f21b64dae8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__martian_day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql index b2e1ae3c6a..e30cb4a81c 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Compute Metrics via Expressions SELECT subq_12.listing__user__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql index 71414f4240..b608ef8175 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Snowflake/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__user__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity__plan0.sql index 48293955ee..9a9cbbf6e9 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity__plan0_optimized.sql index 8d93c807d4..8dcca8b39e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter__plan0.sql index 0ab9dc8fdf..b779ddae59 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_18.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql index 2b4715c927..8864034274 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index e0a7e94c56..799fb7d1d2 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_18.buys AS DOUBLE) / CAST(NULLIF(subq_18.visits, 0) AS DOUBLE) AS visit_buy_conversion_rate_7days diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index 11cb2ddfd0..12418498c5 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_conversion_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_conversion_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_cumulative_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_cumulative_metric_with_custom_granularity__plan0.sql index a18fbb1aec..79369869dc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_cumulative_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_cumulative_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT subq_9.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql index b07fb4f0ad..fe4f924a54 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_cumulative_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Re-aggregate Metric via Group By SELECT metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_derived_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_derived_metric_with_custom_granularity__plan0.sql index f726fb8f46..b095441003 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_derived_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_derived_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_12.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_derived_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_derived_metric_with_custom_granularity__plan0_optimized.sql index d315d358a7..291ffa6f57 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_derived_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_derived_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql index 1a44d4b3f0..8469d512f2 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql index 2d94e630dd..c5fdcfc118 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_join_to_time_spine_metric_grouped_by_custom_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_metric_grouped_by_custom_grain +test_filename: test_custom_granularity.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index 84f9aa202b..62c02b1ea0 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index 091f68a2c1..9a4fa054fc 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['listings', 'metric_time__martian_day', 'listing__ds__month'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_multiple_metrics_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_multiple_metrics_with_custom_granularity__plan0.sql index fd82862df4..3f7d75cc8b 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_multiple_metrics_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_multiple_metrics_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__martian_day, subq_11.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql index ae8868ac3d..e67f5c3902 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_multiple_metrics_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_17.metric_time__martian_day, subq_23.metric_time__martian_day) AS metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql index e059eb364b..23024f40b3 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__day', 'metric_time__martian_day', 'user__bio_added_ts__martian_day', 'user__bio_added_ts__month'] SELECT subq_6.user__bio_added_ts__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql index f4cb2ff0cf..e11e6a8784 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_joined_to_non_default_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_joined_to_non_default_grain +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Join to Custom Granularity Dataset diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0.sql index e336d4958f..8f1cd333b4 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['metric_time__martian_day',] SELECT subq_2.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql index cb56b24088..42bc30855f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_metric_time +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['metric_time__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_non_metric_time__plan0.sql index 5df03967f5..c333e3aad2 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Pass Only Elements: ['booking__ds__martian_day',] SELECT subq_1.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql index d800e789e7..73e96c218d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metric_custom_granularity_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_no_metric_custom_granularity_non_metric_time +test_filename: test_custom_granularity.py +--- -- Read Elements From Semantic Model 'bookings_source' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['booking__ds__martian_day',] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_filter__plan0.sql index e8ae0c3a04..c6a32e9c57 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Pass Only Elements: ['listing__ds__day',] SELECT subq_2.listing__ds__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql index bce724a864..967bfd2894 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql index 15618f7d0c..0b7997c3ef 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Pass Only Elements: ['listing__ds__martian_day',] SELECT subq_2.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index 3dd32191d6..ee15867d33 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_no_metrics_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_no_metrics_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Group by items only queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__ds__martian_day',] SELECT diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity__plan0.sql index 39ae456b28..e5da0bfe87 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity__plan0_optimized.sql index 60ce5ce312..868995c86e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql index c971ebc6db..7d8cfc8c66 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql index f5b2f59fc8..9c7b3fb14e 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_offset_metric_with_custom_granularity_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_metric_with_custom_granularity_filter_not_in_group_by +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity__plan0.sql index 485f396d41..ac07bcaa2d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_4.booking__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity__plan0_optimized.sql index ec04bb54d3..0ee1f90d6d 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity +test_filename: test_custom_granularity.py +--- -- Metric Time Dimension 'ds' -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'booking__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_and_join__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_and_join__plan0.sql index aab3d10a4a..b5671cea38 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_and_join__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_and_join__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Compute Metrics via Expressions SELECT subq_8.listing__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql index 3b149b39b6..18fe09909f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_and_join__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_custom_granularity_and_join +test_filename: test_custom_granularity.py +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_filter__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_filter__plan0.sql index 63fbcb878f..dee94d6b60 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.bookings diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql index 1ea0cb2615..5d5f3a5077 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_filter +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is not used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql index cf700e14a3..0ff871dbfa 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql index e5498b173a..f21b64dae8 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_custom_granularity_in_filter_and_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_custom_granularity_in_filter_and_group_by +test_filename: test_custom_granularity.py +docstring: + Simple metric queried with a filter on a custom grain, where that grain is also used in the group by. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__martian_day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql index 2e00a59027..9fd79d8c1f 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_multi_hop_custom_granularity__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Compute Metrics via Expressions SELECT subq_12.listing__user__ds__martian_day diff --git a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql index 71414f4240..b608ef8175 100644 --- a/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_custom_granularity.py/SqlQueryPlan/Trino/test_simple_metric_with_multi_hop_custom_granularity__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_metric_with_multi_hop_custom_granularity +test_filename: test_custom_granularity.py +docstring: + Test simple metric with a multi hop dimension and custom grain. +--- -- Join Standard Outputs -- Join to Custom Granularity Dataset -- Pass Only Elements: ['bookings', 'listing__user__ds__martian_day'] diff --git a/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml b/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml index 62e87117ce..30cb42ea7e 100644 --- a/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml +++ b/tests_metricflow/snapshots/test_cyclic_join.py/DataflowPlan/test_cyclic_join__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_cyclic_join +test_filename: test_cyclic_join.py +docstring: + Tests that sources with the same joinable keys don't cause cycle issues. +--- diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/BigQuery/test_build_metric_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/BigQuery/test_build_metric_tasks__query0.sql index 59d434777f..6d2fa9c8d8 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/BigQuery/test_build_metric_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/BigQuery/test_build_metric_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_metric_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , SUM(count_dogs) AS count_dogs diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/BigQuery/test_build_saved_query_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/BigQuery/test_build_saved_query_tasks__query0.sql index f8ae12667d..c34c9646e1 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/BigQuery/test_build_saved_query_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/BigQuery/test_build_saved_query_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_saved_query_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Databricks/test_build_metric_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Databricks/test_build_metric_tasks__query0.sql index f705fe3237..e654ef0a66 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Databricks/test_build_metric_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Databricks/test_build_metric_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_metric_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , SUM(count_dogs) AS count_dogs diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Databricks/test_build_saved_query_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Databricks/test_build_saved_query_tasks__query0.sql index 950c501eba..ef605803b7 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Databricks/test_build_saved_query_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Databricks/test_build_saved_query_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_saved_query_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/DuckDB/test_build_metric_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/DuckDB/test_build_metric_tasks__query0.sql index f705fe3237..e654ef0a66 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/DuckDB/test_build_metric_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/DuckDB/test_build_metric_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_metric_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , SUM(count_dogs) AS count_dogs diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/DuckDB/test_build_saved_query_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/DuckDB/test_build_saved_query_tasks__query0.sql index 950c501eba..ef605803b7 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/DuckDB/test_build_saved_query_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/DuckDB/test_build_saved_query_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_saved_query_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Postgres/test_build_metric_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Postgres/test_build_metric_tasks__query0.sql index f705fe3237..e654ef0a66 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Postgres/test_build_metric_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Postgres/test_build_metric_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_metric_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , SUM(count_dogs) AS count_dogs diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Postgres/test_build_saved_query_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Postgres/test_build_saved_query_tasks__query0.sql index 950c501eba..ef605803b7 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Postgres/test_build_saved_query_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Postgres/test_build_saved_query_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_saved_query_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Redshift/test_build_metric_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Redshift/test_build_metric_tasks__query0.sql index f705fe3237..e654ef0a66 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Redshift/test_build_metric_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Redshift/test_build_metric_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_metric_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , SUM(count_dogs) AS count_dogs diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Redshift/test_build_saved_query_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Redshift/test_build_saved_query_tasks__query0.sql index 950c501eba..ef605803b7 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Redshift/test_build_saved_query_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Redshift/test_build_saved_query_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_saved_query_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Snowflake/test_build_metric_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Snowflake/test_build_metric_tasks__query0.sql index f705fe3237..e654ef0a66 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Snowflake/test_build_metric_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Snowflake/test_build_metric_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_metric_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , SUM(count_dogs) AS count_dogs diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Snowflake/test_build_saved_query_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Snowflake/test_build_saved_query_tasks__query0.sql index 950c501eba..ef605803b7 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Snowflake/test_build_saved_query_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Snowflake/test_build_saved_query_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_saved_query_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Trino/test_build_metric_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Trino/test_build_metric_tasks__query0.sql index f705fe3237..e654ef0a66 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Trino/test_build_metric_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Trino/test_build_metric_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_metric_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , SUM(count_dogs) AS count_dogs diff --git a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Trino/test_build_saved_query_tasks__query0.sql b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Trino/test_build_saved_query_tasks__query0.sql index 950c501eba..ef605803b7 100644 --- a/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Trino/test_build_saved_query_tasks__query0.sql +++ b/tests_metricflow/snapshots/test_data_warehouse_tasks.py/str/Trino/test_build_saved_query_tasks__query0.sql @@ -1,3 +1,6 @@ +test_name: test_build_saved_query_tasks +test_filename: test_data_warehouse_tasks.py +--- SELECT metric_time__day , listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml index 67e5db8a0e..2ef4106bb1 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_common_semantic_model__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_common_semantic_model +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a simple plan getting a metric and a local dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml index 4b6ab20d20..3584d14751 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_with_metric_time__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_no_window_or_grain_with_metric_time +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml index fec3485c8c..791400cee2 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_no_window_or_grain_without_metric_time__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_cumulative_metric_no_window_or_grain_without_metric_time +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml index 2ed3102d3d..6d769b8a99 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_non_default_grain__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_non_default_grain +test_filename: test_dataflow_plan_builder.py +docstring: + Test querying a cumulative metric using a granularity that is not the metric's default. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml index 1f1c90395f..4e666acbfd 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_cumulative_metric_with_window__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_cumulative_metric_with_window +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to compute a cumulative metric. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml index 53903f3f65..e7226c195d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_cumulative_metric_with_non_default_grain__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_derived_cumulative_metric_with_non_default_grain +test_filename: test_dataflow_plan_builder.py +docstring: + Test querying a derived metric with a cumulative input metric using non-default granularity. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml index 095c832da1..b2f69c23da 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_to_grain__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_derived_metric_offset_to_grain +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a simple plan getting a metric and a local dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml index f41943ae25..89893e30bb 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_window__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_derived_metric_offset_window +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a simple plan getting a metric and a local dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml index 71adcf6d22..e359957f56 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_metric_offset_with_granularity__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_derived_metric_offset_with_granularity +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml index 02ef115d87..a24de25d6d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_derived_offset_cumulative_metric__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml index b1b8501a25..fa7362a8b6 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dimensions_with_time_constraint__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml index d8e2a1299a..bc478a18ab 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_distinct_values_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to get distinct values of a dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml index 00125db532..b212e6c759 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_distinct_values_plan_with_join__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_distinct_values_plan_with_join +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to get distinct values of 2 dimensions, where a join is required. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml index 237663c5e9..ef7cad3ca6 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_dont_join_to_time_spine_if_no_time_dimension_requested__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_dont_join_to_time_spine_if_no_time_dimension_requested +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml index 210e4669bb..4acddea8cb 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_derived_metric__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_derived_metric +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml index bc6553cc83..67b73c422f 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_filters__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_dataflow_plan_builder.py +docstring: + Test that filter is not applied until after time spine join. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml index dd6bbcd9ae..99ecbc8466 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_metric_time__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_metric_time +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml index 99338874f6..7a9c85d18e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_join_to_time_spine_with_non_metric_time__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_non_metric_time +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml index fb8cfac2cb..50d2d1391e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_joined_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_joined_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan getting a measure and a joined dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml index 007af3ed97..eaf10f3f96 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_limit_rows_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_limit_rows_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml index 44836ee34a..2c31451b96 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_measure_constraint_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan for querying a metric with a constraint on one or more of its input measures. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml index db61907727..7f8d071775 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_measure_constraint_with_reused_measure_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_measure_constraint_with_reused_measure_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan for querying a metric with a constraint on one or more of its input measures. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml index 95e30f9ec7..65b10d3b14 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_metric_where_filter__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_metric_in_metric_where_filter +test_filename: test_dataflow_plan_builder.py +docstring: + Test querying a metric that has a metric in its where filter. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml index d5328a2262..8ab3aacafe 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_in_query_where_filter__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_metric_in_query_where_filter +test_filename: test_dataflow_plan_builder.py +docstring: + Test querying a metric that has a metric in its where filter. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml index 36266f92e9..cad2dc98a9 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_only__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_metric_time_only +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml index e58a87fe41..8fb0119edc 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_quarter__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml index 4bcb8d432c..d77ff2ce3d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_metric_time_with_other_dimensions__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml index ec0e09f3f2..4add466a55 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml index dda234e942..0c925308b8 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_metric_time_week__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml index 5886aada0e..e393143c42 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_categorical__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to get the min & max distinct values of a categorical dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml index 26dded2b57..59ca10e0d2 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to get the min & max distinct values of a time dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml index 473648c86c..35ab36674e 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_min_max_only_time_year__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_year +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to get the min & max distinct values of a time dimension with year granularity. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml index da1ec9cea4..34a0c3b2ee 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multi_semantic_model_ratio_metrics_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_multi_semantic_model_ratio_metrics_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to retrieve a ratio where both measures come from one semantic model. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml index 01565ae1f7..5d9a8bc599 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multihop_join_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_multihop_join_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan with an order by. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml index a60caf65d2..2f9f1774b0 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_multiple_metrics_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_multiple_metrics_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to retrieve multiple metrics. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml index cf63eee579..f82e0ccbd5 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_nested_derived_metric_with_outer_offset__dfp_0.xml @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_outer_offset +test_filename: test_dataflow_plan_builder.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml index 9adf30308f..69377fe729 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_to_grain_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_dataflow_plan_builder.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml index ec4b9441a0..37a544adde 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_offset_window_metric_filter_and_query_have_different_granularities__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_dataflow_plan_builder.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml index 13efa2eb88..bd28eda812 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_order_by_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_order_by_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan with an order by. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml index c346097a11..3cf259d26f 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_primary_entity_dimension__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_primary_entity_dimension +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a simple plan getting a metric and a local dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml index c346097a11..ff8d95df93 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_simple_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_simple_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a simple plan getting a metric and a local dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml index 44bed7b48f..9dcc748213 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_single_semantic_model_ratio_metrics_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_single_semantic_model_ratio_metrics_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a plan to retrieve a ratio where both measures come from one semantic model. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml index 938ce395f0..52d864d20d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_where_constrained_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a simple plan getting a metric and a local dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml index 5cac881e66..3db4144c0d 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_plan_time_dimension__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_where_constrained_plan_time_dimension +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a simple plan getting a metric and a local dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml index 001ed5ddd6..4cb87264ca 100644 --- a/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_plan_builder.py/DataflowPlan/test_where_constrained_with_common_linkable_plan__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_where_constrained_with_common_linkable_plan +test_filename: test_dataflow_plan_builder.py +docstring: + Tests a dataflow plan where the where clause has a common linkable with the query. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_combined_metrics_plan__ep_0.xml index 64512a66a6..5d5d9d565a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml index bfbeda78de..82457644c2 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_joined_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_joined_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_multihop_joined_plan__ep_0.xml index 75711156bb..414e482262 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_multihop_joined_plan__ep_0.xml @@ -1,3 +1,8 @@ +test_name: test_multihop_joined_plan +test_filename: test_dataflow_to_execution.py +docstring: + Tests a plan getting a measure and a joined dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_small_combined_metrics_plan__ep_0.xml index b1df474f4c..6f31d9f164 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/BigQuery/test_small_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_small_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_combined_metrics_plan__ep_0.xml index 16ed0e7902..6af35e7d73 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_joined_plan__ep_0.xml index b3e3698b3b..f13d263688 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_joined_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_joined_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_multihop_joined_plan__ep_0.xml index 8682d4e277..684ff89128 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_multihop_joined_plan__ep_0.xml @@ -1,3 +1,8 @@ +test_name: test_multihop_joined_plan +test_filename: test_dataflow_to_execution.py +docstring: + Tests a plan getting a measure and a joined dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_small_combined_metrics_plan__ep_0.xml index 38ff24ffce..a9d8f915a0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Databricks/test_small_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_small_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml index 16ed0e7902..6af35e7d73 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml index b3e3698b3b..f13d263688 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_joined_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_joined_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml index 8682d4e277..684ff89128 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_multihop_joined_plan__ep_0.xml @@ -1,3 +1,8 @@ +test_name: test_multihop_joined_plan +test_filename: test_dataflow_to_execution.py +docstring: + Tests a plan getting a measure and a joined dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_small_combined_metrics_plan__ep_0.xml index 38ff24ffce..a9d8f915a0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/DuckDB/test_small_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_small_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_combined_metrics_plan__ep_0.xml index 16ed0e7902..6af35e7d73 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_joined_plan__ep_0.xml index b3e3698b3b..f13d263688 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_joined_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_joined_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_multihop_joined_plan__ep_0.xml index 8682d4e277..684ff89128 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_multihop_joined_plan__ep_0.xml @@ -1,3 +1,8 @@ +test_name: test_multihop_joined_plan +test_filename: test_dataflow_to_execution.py +docstring: + Tests a plan getting a measure and a joined dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_small_combined_metrics_plan__ep_0.xml index 38ff24ffce..a9d8f915a0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Postgres/test_small_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_small_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_combined_metrics_plan__ep_0.xml index 16ed0e7902..6af35e7d73 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_joined_plan__ep_0.xml index b3e3698b3b..f13d263688 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_joined_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_joined_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_multihop_joined_plan__ep_0.xml index 8682d4e277..684ff89128 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_multihop_joined_plan__ep_0.xml @@ -1,3 +1,8 @@ +test_name: test_multihop_joined_plan +test_filename: test_dataflow_to_execution.py +docstring: + Tests a plan getting a measure and a joined dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_small_combined_metrics_plan__ep_0.xml index 38ff24ffce..a9d8f915a0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Redshift/test_small_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_small_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_combined_metrics_plan__ep_0.xml index 16ed0e7902..6af35e7d73 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml index b3e3698b3b..f13d263688 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_joined_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_joined_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_multihop_joined_plan__ep_0.xml index 8682d4e277..684ff89128 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_multihop_joined_plan__ep_0.xml @@ -1,3 +1,8 @@ +test_name: test_multihop_joined_plan +test_filename: test_dataflow_to_execution.py +docstring: + Tests a plan getting a measure and a joined dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_small_combined_metrics_plan__ep_0.xml index 38ff24ffce..a9d8f915a0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Snowflake/test_small_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_small_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml index 16ed0e7902..6af35e7d73 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_joined_plan__ep_0.xml index b3e3698b3b..f13d263688 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_joined_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_joined_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml index 8682d4e277..684ff89128 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_multihop_joined_plan__ep_0.xml @@ -1,3 +1,8 @@ +test_name: test_multihop_joined_plan +test_filename: test_dataflow_to_execution.py +docstring: + Tests a plan getting a measure and a joined dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_small_combined_metrics_plan__ep_0.xml b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_small_combined_metrics_plan__ep_0.xml index 38ff24ffce..a9d8f915a0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_small_combined_metrics_plan__ep_0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_execution.py/ExecutionPlan/Trino/test_small_combined_metrics_plan__ep_0.xml @@ -1,3 +1,6 @@ +test_name: test_small_combined_metrics_plan +test_filename: test_dataflow_to_execution.py +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml index 994c19943d..6c538cbb74 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_compute_metrics_node_simple_expr__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml index 64a7de4ad4..694abd4f7a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml index c0ef3ef454..2fb63b6c0f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_without_offset__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_without_offset__plan0.xml index 4fe6f30b38..76da467914 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_without_offset__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/DataflowPlan/test_join_to_time_spine_node_without_offset__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_combine_output_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_combine_output_node__plan0.sql index 8181473805..e2679b8b2b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_combine_output_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_combine_output_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_2.is_instant, subq_5.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_combine_output_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_combine_output_node__plan0_optimized.sql index 82d615852d..d8f9173777 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_combine_output_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_combine_output_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_8.is_instant, subq_11.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node__plan0.sql index a78a40c79d..c39563d1d6 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node__plan0_optimized.sql index 39785fc45b..a093e35ee9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Join Standard Outputs -- Aggregate Measures -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql index e98b83b46b..17e8048640 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT subq_18.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql index 5c1257ec0b..578cd7448e 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql index 1bdd606db3..a9a8e3b421 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql index 2d92a0b0ea..d3e4043887 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_simple_expr__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_simple_expr__plan0.sql index 53f2e34c4b..47f095b380 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_simple_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_simple_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_simple_expr__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_simple_expr__plan0_optimized.sql index d646b7402f..c171965056 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_simple_expr__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_compute_metrics_node_simple_expr__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_constrain_time_range_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_constrain_time_range_node__plan0.sql index e8dee856fb..bb18eac324 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_constrain_time_range_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_constrain_time_range_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-02T00:00:00] SELECT subq_2.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_constrain_time_range_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_constrain_time_range_node__plan0_optimized.sql index f76c3fea12..fbd801f99f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_constrain_time_range_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_constrain_time_range_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'ds__day'] -- Metric Time Dimension 'ds' diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimension_with_joined_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimension_with_joined_where_constraint__plan0.sql index 153b3f9a4a..6dc0cf6754 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimension_with_joined_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimension_with_joined_where_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest',] SELECT subq_4.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimension_with_joined_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimension_with_joined_where_constraint__plan0_optimized.sql index 08f5aa9a14..a454bd9531 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimension_with_joined_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimension_with_joined_where_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0.sql index 63f88a3bf1..c4eb1521aa 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0_optimized.sql index 4365193bed..3543407388 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_node__plan0.sql index 30145bdd46..3e3dbf6234 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Pass Only Elements: ['bookings',] SELECT subq_0.bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_node__plan0_optimized.sql index 554ce484fb..6bd8bbc9b3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_node__plan0.sql index e9ea9b6f20..e11fffd62b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT subq_1.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_node__plan0_optimized.sql index ef47de77ef..08050e5a81 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql index ea342dd3b9..58ba0c7cc3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql index c13f6cf11d..797b060506 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_window__plan0.sql index 9594d9ef88..73d0cce242 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql index b86e41cd63..2363039151 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_without_offset__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_without_offset__plan0.sql index 3d64a5d15d..6c69599d45 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_without_offset__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_without_offset__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_without_offset__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_without_offset__plan0_optimized.sql index afecd64116..70ad328317 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_without_offset__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_node_without_offset__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_measure_aggregation_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_measure_aggregation_node__plan0.sql index 61776243c7..b5d285384d 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_measure_aggregation_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_measure_aggregation_node__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Aggregate Measures SELECT SUM(subq_1.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_measure_aggregation_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_measure_aggregation_node__plan0_optimized.sql index 6e5528a6c9..8e65d6dca7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_measure_aggregation_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_measure_aggregation_node__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'instant_bookings', 'average_booking_value', 'bookers'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multi_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multi_join_node__plan0.sql index 86e179aee0..2c9c81a5a8 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multi_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multi_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_3.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multi_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multi_join_node__plan0_optimized.sql index a880de7068..fe3abca276 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multi_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_multi_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_9.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_order_by_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_order_by_node__plan0.sql index de3e01e42a..96c25d3608 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_order_by_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_order_by_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Order By ['ds__day', 'bookings'] SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_order_by_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_order_by_node__plan0_optimized.sql index c48515ef47..6814348fca 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_order_by_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_order_by_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By ['ds__day', 'bookings'] diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node__plan0.sql index e2ed178360..910fa90624 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node__plan0_optimized.sql index cedc4b3f63..66e84521bc 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_grouping__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_grouping__plan0.sql index aadb6dc88c..9d895f411d 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_grouping__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_grouping__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_grouping__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_grouping__plan0_optimized.sql index 497a35620c..90c6d39ac5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_grouping__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_grouping__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_queried_group_by__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_queried_group_by__plan0.sql index 5fabcdcbe3..96baad3f08 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_queried_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_queried_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql index 98354966a5..d4f4f7f993 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_single_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_single_join_node__plan0.sql index 69ccb6a64a..9d43394ec6 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_single_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_single_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_1.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_single_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_single_join_node__plan0_optimized.sql index a1cd7ac335..38534197cb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_single_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_single_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_5.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_source_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_source_node__plan0.sql index afa118a65c..4398a8899a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_source_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_source_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_source_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_source_node__plan0_optimized.sql index 6f863aca28..65fa39be3a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_source_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/BigQuery/test_source_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_combine_output_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_combine_output_node__plan0.sql index b66a332135..855a148716 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_combine_output_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_combine_output_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_2.is_instant, subq_5.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_combine_output_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_combine_output_node__plan0_optimized.sql index ad81788114..83d03d0be9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_combine_output_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_combine_output_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_8.is_instant, subq_11.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node__plan0.sql index 520c9ac9fa..fb7c001723 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node__plan0_optimized.sql index 5ebe7177e8..a543654e55 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Join Standard Outputs -- Aggregate Measures -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql index 8e2a3ae1f4..305700ba35 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT subq_18.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql index 3d343d6be9..506dcc51b4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql index d02d3dc0f8..86d2f9133e 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql index c943b1a8d9..d52a1a63d4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_simple_expr__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_simple_expr__plan0.sql index d857fd72d4..e5b74b607a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_simple_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_simple_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_simple_expr__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_simple_expr__plan0_optimized.sql index 65e701e3dd..af791bf498 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_simple_expr__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_compute_metrics_node_simple_expr__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_constrain_time_range_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_constrain_time_range_node__plan0.sql index a767f9cc0b..26eea75d52 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_constrain_time_range_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_constrain_time_range_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-02T00:00:00] SELECT subq_2.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_constrain_time_range_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_constrain_time_range_node__plan0_optimized.sql index d0d15f6943..600c81b84a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_constrain_time_range_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_constrain_time_range_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'ds__day'] -- Metric Time Dimension 'ds' diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimension_with_joined_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimension_with_joined_where_constraint__plan0.sql index 7c26173807..8234557619 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimension_with_joined_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimension_with_joined_where_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest',] SELECT subq_4.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimension_with_joined_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimension_with_joined_where_constraint__plan0_optimized.sql index 08f5aa9a14..a454bd9531 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimension_with_joined_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimension_with_joined_where_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0.sql index 5907829912..231b37bd3f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..53dc07a0e3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_node__plan0.sql index 343ccdb7e8..7e49da4328 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Pass Only Elements: ['bookings',] SELECT subq_0.bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_node__plan0_optimized.sql index 554ce484fb..6bd8bbc9b3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_node__plan0.sql index a39a7e7609..88fb5d31ea 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT subq_1.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_node__plan0_optimized.sql index 5ee87ba25f..87d2298a5f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql index eec56d28b8..e856600e97 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql index 6054b232dc..9bce24c2d9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_window__plan0.sql index 278352a1b4..08da3fda22 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql index 61bc9299ec..70d6b89f2f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_without_offset__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_without_offset__plan0.sql index 84ae7ad473..2a7fd2710e 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_without_offset__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_without_offset__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_without_offset__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_without_offset__plan0_optimized.sql index e4f47734b0..0af2dc3a8c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_without_offset__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_join_to_time_spine_node_without_offset__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_measure_aggregation_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_measure_aggregation_node__plan0.sql index 15f15c236e..9d0236a9be 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_measure_aggregation_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_measure_aggregation_node__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Aggregate Measures SELECT SUM(subq_1.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_measure_aggregation_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_measure_aggregation_node__plan0_optimized.sql index 6e5528a6c9..8e65d6dca7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_measure_aggregation_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_measure_aggregation_node__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'instant_bookings', 'average_booking_value', 'bookers'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multi_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multi_join_node__plan0.sql index 2cd623dc07..7cb0ed483d 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multi_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multi_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_3.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multi_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multi_join_node__plan0_optimized.sql index a880de7068..fe3abca276 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multi_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_multi_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_9.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_order_by_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_order_by_node__plan0.sql index 6c7a1e644c..6d2d362b1b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_order_by_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_order_by_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Order By ['ds__day', 'bookings'] SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_order_by_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_order_by_node__plan0_optimized.sql index bcebfe9d5f..15e0abb649 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_order_by_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_order_by_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By ['ds__day', 'bookings'] diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node__plan0.sql index 30647d37e7..ab8eb29be8 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node__plan0_optimized.sql index 537a61a682..3cff4f8fc1 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_grouping__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_grouping__plan0.sql index bc60d5b464..1c00af0ef2 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_grouping__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_grouping__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_grouping__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_grouping__plan0_optimized.sql index e8106c8ce7..da74312e89 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_grouping__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_grouping__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_queried_group_by__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_queried_group_by__plan0.sql index 03b63bc149..8d5197e01b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_queried_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_queried_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql index 16be767079..787ad91d1f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_single_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_single_join_node__plan0.sql index 05e59e291e..e678b7dccc 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_single_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_single_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_1.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_single_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_single_join_node__plan0_optimized.sql index a1cd7ac335..38534197cb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_single_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_single_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_5.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_source_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_source_node__plan0.sql index da33eea744..f1c946a18b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_source_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_source_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_source_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_source_node__plan0_optimized.sql index 5987daa5e3..57ee404039 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_source_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Databricks/test_source_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_combine_output_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_combine_output_node__plan0.sql index a8d97dae7f..4f04d2cf95 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_combine_output_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_combine_output_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_2.is_instant, subq_5.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_combine_output_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_combine_output_node__plan0_optimized.sql index ad81788114..83d03d0be9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_combine_output_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_combine_output_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_8.is_instant, subq_11.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node__plan0.sql index 518be50ca5..2bf52d3d7c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node__plan0_optimized.sql index 5ebe7177e8..a543654e55 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Join Standard Outputs -- Aggregate Measures -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql index 9b17845773..0376e681ae 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT subq_18.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql index 3d343d6be9..506dcc51b4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql index 868e41e121..1cebfede20 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql index c943b1a8d9..d52a1a63d4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_simple_expr__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_simple_expr__plan0.sql index dfbf89867b..d19b81335a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_simple_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_simple_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_simple_expr__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_simple_expr__plan0_optimized.sql index 65e701e3dd..af791bf498 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_simple_expr__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_compute_metrics_node_simple_expr__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_constrain_time_range_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_constrain_time_range_node__plan0.sql index 5414f95860..77dd345a88 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_constrain_time_range_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_constrain_time_range_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-02T00:00:00] SELECT subq_2.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_constrain_time_range_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_constrain_time_range_node__plan0_optimized.sql index d0d15f6943..600c81b84a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_constrain_time_range_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_constrain_time_range_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'ds__day'] -- Metric Time Dimension 'ds' diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimension_with_joined_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimension_with_joined_where_constraint__plan0.sql index a254ce28b8..6857dcddc5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimension_with_joined_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimension_with_joined_where_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest',] SELECT subq_4.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimension_with_joined_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimension_with_joined_where_constraint__plan0_optimized.sql index 08f5aa9a14..a454bd9531 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimension_with_joined_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimension_with_joined_where_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0.sql index e4d9c4cec1..66567062b0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..53dc07a0e3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_node__plan0.sql index 4c0230bef5..8dffb6ba1c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Pass Only Elements: ['bookings',] SELECT subq_0.bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_node__plan0_optimized.sql index 554ce484fb..6bd8bbc9b3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_node__plan0.sql index 6c7624e9c6..2b95e5683b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT subq_1.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_node__plan0_optimized.sql index 5ee87ba25f..87d2298a5f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql index d1eb9e6cdf..5421e3ac19 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql index 6054b232dc..9bce24c2d9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_window__plan0.sql index 6556fc936f..617f26c36f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql index 836bd707a7..2955fcd4d4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_without_offset__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_without_offset__plan0.sql index 2c925cc021..5c9c3e21a7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_without_offset__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_without_offset__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_without_offset__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_without_offset__plan0_optimized.sql index e4f47734b0..0af2dc3a8c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_without_offset__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_node_without_offset__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_measure_aggregation_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_measure_aggregation_node__plan0.sql index d3f9a7fb97..02998773b2 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_measure_aggregation_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_measure_aggregation_node__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Aggregate Measures SELECT SUM(subq_1.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_measure_aggregation_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_measure_aggregation_node__plan0_optimized.sql index 6e5528a6c9..8e65d6dca7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_measure_aggregation_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_measure_aggregation_node__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'instant_bookings', 'average_booking_value', 'bookers'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multi_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multi_join_node__plan0.sql index 9607966cf1..bb0b2e2177 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multi_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multi_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_3.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multi_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multi_join_node__plan0_optimized.sql index a880de7068..fe3abca276 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multi_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_multi_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_9.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_order_by_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_order_by_node__plan0.sql index 49a2ea3b75..c75c1d367f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_order_by_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_order_by_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Order By ['ds__day', 'bookings'] SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_order_by_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_order_by_node__plan0_optimized.sql index bcebfe9d5f..15e0abb649 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_order_by_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_order_by_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By ['ds__day', 'bookings'] diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0.sql index 27fe212233..a6f7ba2a91 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0_optimized.sql index a30ec670bb..39162b1fc3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0.sql index 5fc8b61427..d89f0536b4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0_optimized.sql index b323d6047d..de11b69d45 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_grouping__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0.sql index 71632426c5..d2d9b3d585 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql index bd64d6062f..75e650b99b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_single_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_single_join_node__plan0.sql index 1d89d14791..c4a6fd0063 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_single_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_single_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_1.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_single_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_single_join_node__plan0_optimized.sql index a1cd7ac335..38534197cb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_single_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_single_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_5.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_source_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_source_node__plan0.sql index d94b68c968..a9460f89f5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_source_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_source_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_source_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_source_node__plan0_optimized.sql index 9814c2d0cf..8dfd8533be 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_source_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/DuckDB/test_source_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_combine_output_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_combine_output_node__plan0.sql index a8d97dae7f..4f04d2cf95 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_combine_output_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_combine_output_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_2.is_instant, subq_5.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_combine_output_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_combine_output_node__plan0_optimized.sql index ad81788114..83d03d0be9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_combine_output_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_combine_output_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_8.is_instant, subq_11.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node__plan0.sql index 518be50ca5..2bf52d3d7c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node__plan0_optimized.sql index 5ebe7177e8..a543654e55 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Join Standard Outputs -- Aggregate Measures -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql index 99b5b1a2b3..5debbb321b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT subq_18.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql index df63e3cc3d..53c3ae9ad8 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql index 86723995a1..9674dc1ebe 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql index b2cd839070..a2181a9465 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_simple_expr__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_simple_expr__plan0.sql index dfbf89867b..d19b81335a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_simple_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_simple_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_simple_expr__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_simple_expr__plan0_optimized.sql index 65e701e3dd..af791bf498 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_simple_expr__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_compute_metrics_node_simple_expr__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_constrain_time_range_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_constrain_time_range_node__plan0.sql index 5414f95860..77dd345a88 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_constrain_time_range_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_constrain_time_range_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-02T00:00:00] SELECT subq_2.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_constrain_time_range_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_constrain_time_range_node__plan0_optimized.sql index d0d15f6943..600c81b84a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_constrain_time_range_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_constrain_time_range_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'ds__day'] -- Metric Time Dimension 'ds' diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimension_with_joined_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimension_with_joined_where_constraint__plan0.sql index a254ce28b8..6857dcddc5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimension_with_joined_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimension_with_joined_where_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest',] SELECT subq_4.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimension_with_joined_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimension_with_joined_where_constraint__plan0_optimized.sql index 08f5aa9a14..a454bd9531 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimension_with_joined_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimension_with_joined_where_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0.sql index e4d9c4cec1..66567062b0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..53dc07a0e3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_node__plan0.sql index 4c0230bef5..8dffb6ba1c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Pass Only Elements: ['bookings',] SELECT subq_0.bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_node__plan0_optimized.sql index 554ce484fb..6bd8bbc9b3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_node__plan0.sql index 6c7624e9c6..2b95e5683b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT subq_1.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_node__plan0_optimized.sql index 5ee87ba25f..87d2298a5f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql index d1eb9e6cdf..5421e3ac19 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql index 6054b232dc..9bce24c2d9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_window__plan0.sql index cd070b2730..304631e138 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql index 21b1f16711..72bc46fbee 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_without_offset__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_without_offset__plan0.sql index 2c925cc021..5c9c3e21a7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_without_offset__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_without_offset__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_without_offset__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_without_offset__plan0_optimized.sql index e4f47734b0..0af2dc3a8c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_without_offset__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_join_to_time_spine_node_without_offset__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_measure_aggregation_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_measure_aggregation_node__plan0.sql index d3f9a7fb97..02998773b2 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_measure_aggregation_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_measure_aggregation_node__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Aggregate Measures SELECT SUM(subq_1.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_measure_aggregation_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_measure_aggregation_node__plan0_optimized.sql index 6e5528a6c9..8e65d6dca7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_measure_aggregation_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_measure_aggregation_node__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'instant_bookings', 'average_booking_value', 'bookers'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multi_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multi_join_node__plan0.sql index 9607966cf1..bb0b2e2177 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multi_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multi_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_3.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multi_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multi_join_node__plan0_optimized.sql index a880de7068..fe3abca276 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multi_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_multi_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_9.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_order_by_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_order_by_node__plan0.sql index 49a2ea3b75..c75c1d367f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_order_by_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_order_by_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Order By ['ds__day', 'bookings'] SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_order_by_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_order_by_node__plan0_optimized.sql index bcebfe9d5f..15e0abb649 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_order_by_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_order_by_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By ['ds__day', 'bookings'] diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node__plan0.sql index 27fe212233..a6f7ba2a91 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node__plan0_optimized.sql index a30ec670bb..39162b1fc3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_grouping__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_grouping__plan0.sql index 5fc8b61427..d89f0536b4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_grouping__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_grouping__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_grouping__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_grouping__plan0_optimized.sql index b323d6047d..de11b69d45 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_grouping__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_grouping__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_queried_group_by__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_queried_group_by__plan0.sql index 71632426c5..d2d9b3d585 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_queried_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_queried_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql index bd64d6062f..75e650b99b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_single_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_single_join_node__plan0.sql index 1d89d14791..c4a6fd0063 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_single_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_single_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_1.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_single_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_single_join_node__plan0_optimized.sql index a1cd7ac335..38534197cb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_single_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_single_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_5.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_source_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_source_node__plan0.sql index d94b68c968..a9460f89f5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_source_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_source_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_source_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_source_node__plan0_optimized.sql index 9814c2d0cf..8dfd8533be 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_source_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Postgres/test_source_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_combine_output_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_combine_output_node__plan0.sql index c67c97979c..06af7637da 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_combine_output_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_combine_output_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_2.is_instant, subq_5.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_combine_output_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_combine_output_node__plan0_optimized.sql index ad81788114..83d03d0be9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_combine_output_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_combine_output_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_8.is_instant, subq_11.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node__plan0.sql index 61ccf9b206..c5f6999fe4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node__plan0_optimized.sql index 5ebe7177e8..a543654e55 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Join Standard Outputs -- Aggregate Measures -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql index 2aafc00ba7..95f77c9749 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT subq_18.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql index df63e3cc3d..53c3ae9ad8 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql index 1b15e0c4b9..cd75d4d040 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql index b2cd839070..a2181a9465 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_simple_expr__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_simple_expr__plan0.sql index 49d0e9dc56..6cd6c67c9d 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_simple_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_simple_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_simple_expr__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_simple_expr__plan0_optimized.sql index 65e701e3dd..af791bf498 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_simple_expr__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_compute_metrics_node_simple_expr__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_constrain_time_range_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_constrain_time_range_node__plan0.sql index 1a515595bf..2bd8c04dff 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_constrain_time_range_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_constrain_time_range_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-02T00:00:00] SELECT subq_2.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_constrain_time_range_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_constrain_time_range_node__plan0_optimized.sql index d0d15f6943..600c81b84a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_constrain_time_range_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_constrain_time_range_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'ds__day'] -- Metric Time Dimension 'ds' diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimension_with_joined_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimension_with_joined_where_constraint__plan0.sql index 95966da9a0..82ab0fb611 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimension_with_joined_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimension_with_joined_where_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest',] SELECT subq_4.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimension_with_joined_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimension_with_joined_where_constraint__plan0_optimized.sql index 08f5aa9a14..a454bd9531 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimension_with_joined_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimension_with_joined_where_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0.sql index 11790f4d9c..b1d5525c48 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..53dc07a0e3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_node__plan0.sql index f55759536d..4eac2f80f4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Pass Only Elements: ['bookings',] SELECT subq_0.bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_node__plan0_optimized.sql index 554ce484fb..6bd8bbc9b3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_node__plan0.sql index 1cc84ea68b..1e52118f45 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT subq_1.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_node__plan0_optimized.sql index 5ee87ba25f..87d2298a5f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql index 08f2336170..5aec38dc9c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql index 6054b232dc..9bce24c2d9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_window__plan0.sql index dc9b6b2769..638831d7b5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql index 61bc9299ec..70d6b89f2f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_without_offset__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_without_offset__plan0.sql index b0708bcdc2..c663063d29 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_without_offset__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_without_offset__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_without_offset__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_without_offset__plan0_optimized.sql index e4f47734b0..0af2dc3a8c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_without_offset__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_join_to_time_spine_node_without_offset__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_measure_aggregation_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_measure_aggregation_node__plan0.sql index b6273f4c1f..a7579620a0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_measure_aggregation_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_measure_aggregation_node__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Aggregate Measures SELECT SUM(subq_1.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_measure_aggregation_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_measure_aggregation_node__plan0_optimized.sql index 6e5528a6c9..8e65d6dca7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_measure_aggregation_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_measure_aggregation_node__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'instant_bookings', 'average_booking_value', 'bookers'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multi_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multi_join_node__plan0.sql index b44d0eea85..66d6a8ab99 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multi_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multi_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_3.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multi_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multi_join_node__plan0_optimized.sql index a880de7068..fe3abca276 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multi_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_multi_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_9.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_order_by_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_order_by_node__plan0.sql index 64beab1078..347c41438f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_order_by_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_order_by_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Order By ['ds__day', 'bookings'] SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_order_by_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_order_by_node__plan0_optimized.sql index bcebfe9d5f..15e0abb649 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_order_by_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_order_by_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By ['ds__day', 'bookings'] diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node__plan0.sql index ed7d26e6c8..f4ee437c2d 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node__plan0_optimized.sql index b2005e7d9b..c7d10e2a27 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_grouping__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_grouping__plan0.sql index 7e2461e8f2..4bee6774a8 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_grouping__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_grouping__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_grouping__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_grouping__plan0_optimized.sql index 642d8be45a..1f519d72f4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_grouping__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_grouping__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_queried_group_by__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_queried_group_by__plan0.sql index ac493633cc..0b9609ee44 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_queried_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_queried_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql index a83258d3a5..99b5aee446 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_single_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_single_join_node__plan0.sql index 59c21d9f82..a8c08f5f87 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_single_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_single_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_1.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_single_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_single_join_node__plan0_optimized.sql index a1cd7ac335..38534197cb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_single_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_single_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_5.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_source_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_source_node__plan0.sql index e312066a03..d0dd72b672 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_source_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_source_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_source_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_source_node__plan0_optimized.sql index 430bb9b883..8f42e0e94f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_source_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Redshift/test_source_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_combine_output_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_combine_output_node__plan0.sql index cd50272c26..cfc4cf0f18 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_combine_output_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_combine_output_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_2.is_instant, subq_5.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_combine_output_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_combine_output_node__plan0_optimized.sql index ad81788114..83d03d0be9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_combine_output_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_combine_output_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_8.is_instant, subq_11.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node__plan0.sql index 2a4bb76263..3a9087bf07 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node__plan0_optimized.sql index 5ebe7177e8..a543654e55 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Join Standard Outputs -- Aggregate Measures -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql index 21ba122a90..6205be9e3f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT subq_18.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql index 3d343d6be9..506dcc51b4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql index dad00e3fda..442f121861 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql index c943b1a8d9..d52a1a63d4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_simple_expr__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_simple_expr__plan0.sql index 6b8810b2f6..40d8ffbc2f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_simple_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_simple_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_simple_expr__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_simple_expr__plan0_optimized.sql index 65e701e3dd..af791bf498 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_simple_expr__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_compute_metrics_node_simple_expr__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_constrain_time_range_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_constrain_time_range_node__plan0.sql index 09fc32dc6c..6298cbfc70 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_constrain_time_range_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_constrain_time_range_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-02T00:00:00] SELECT subq_2.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_constrain_time_range_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_constrain_time_range_node__plan0_optimized.sql index d0d15f6943..600c81b84a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_constrain_time_range_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_constrain_time_range_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'ds__day'] -- Metric Time Dimension 'ds' diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimension_with_joined_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimension_with_joined_where_constraint__plan0.sql index 0adb71aabf..f9a152ab5e 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimension_with_joined_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimension_with_joined_where_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest',] SELECT subq_4.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimension_with_joined_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimension_with_joined_where_constraint__plan0_optimized.sql index 08f5aa9a14..a454bd9531 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimension_with_joined_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimension_with_joined_where_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0.sql index cd3786df0e..4f41cf840a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..53dc07a0e3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_node__plan0.sql index 2e7a4c5fd0..2613efab45 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Pass Only Elements: ['bookings',] SELECT subq_0.bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_node__plan0_optimized.sql index 554ce484fb..6bd8bbc9b3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_node__plan0.sql index 01bfb0e712..93669e8e45 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT subq_1.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_node__plan0_optimized.sql index 5ee87ba25f..87d2298a5f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql index 2689896e19..281abbbfab 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql index 6054b232dc..9bce24c2d9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_window__plan0.sql index 6fbac4ea91..978640e184 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql index 61bc9299ec..70d6b89f2f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_without_offset__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_without_offset__plan0.sql index 43273b80a2..63e5460132 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_without_offset__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_without_offset__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_without_offset__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_without_offset__plan0_optimized.sql index e4f47734b0..0af2dc3a8c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_without_offset__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_node_without_offset__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_measure_aggregation_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_measure_aggregation_node__plan0.sql index 1f8d370137..0ee654060e 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_measure_aggregation_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_measure_aggregation_node__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Aggregate Measures SELECT SUM(subq_1.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_measure_aggregation_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_measure_aggregation_node__plan0_optimized.sql index 6e5528a6c9..8e65d6dca7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_measure_aggregation_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_measure_aggregation_node__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'instant_bookings', 'average_booking_value', 'bookers'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multi_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multi_join_node__plan0.sql index 7a3efa023f..dbcb37e35e 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multi_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multi_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_3.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multi_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multi_join_node__plan0_optimized.sql index a880de7068..fe3abca276 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multi_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_multi_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_9.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_order_by_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_order_by_node__plan0.sql index 3f77093112..502f992a79 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_order_by_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_order_by_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Order By ['ds__day', 'bookings'] SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_order_by_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_order_by_node__plan0_optimized.sql index bcebfe9d5f..15e0abb649 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_order_by_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_order_by_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By ['ds__day', 'bookings'] diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node__plan0.sql index 4c8d1b9708..d597c33ced 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node__plan0_optimized.sql index 797894a245..ed2690d3b4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_grouping__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_grouping__plan0.sql index 4a4d9047a7..41b970cdcf 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_grouping__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_grouping__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_grouping__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_grouping__plan0_optimized.sql index 140db6e080..d8406477ed 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_grouping__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_grouping__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_queried_group_by__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_queried_group_by__plan0.sql index 95cedb1499..86b4fb0f14 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_queried_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_queried_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql index f8b674a6d7..e282ab7aa7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_single_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_single_join_node__plan0.sql index c8bcda4fe4..f2703a96eb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_single_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_single_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_1.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_single_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_single_join_node__plan0_optimized.sql index a1cd7ac335..38534197cb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_single_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_single_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_5.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_source_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_source_node__plan0.sql index b748a7e6cd..06fa57a0d0 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_source_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_source_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_source_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_source_node__plan0_optimized.sql index 69c345901c..4f4b2d1cb8 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_source_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Snowflake/test_source_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_combine_output_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_combine_output_node__plan0.sql index f999c0a475..beaf6ab1d5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_combine_output_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_combine_output_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_2.is_instant, subq_5.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_combine_output_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_combine_output_node__plan0_optimized.sql index ad81788114..83d03d0be9 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_combine_output_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_combine_output_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_8.is_instant, subq_11.is_instant) AS is_instant diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node__plan0.sql index c5555e9030..80af12cc47 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node__plan0_optimized.sql index 5ebe7177e8..a543654e55 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Join Standard Outputs -- Aggregate Measures -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql index 4d4c508b4a..7fd73a65af 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT subq_18.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql index 3d343d6be9..506dcc51b4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- -- Compute Metrics via Expressions SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql index da397798f1..04fa9f0064 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql index c943b1a8d9..d52a1a63d4 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_ratio_from_single_semantic_model__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_simple_expr__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_simple_expr__plan0.sql index 6ad2ff6da7..470c1c9eee 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_simple_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_simple_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT subq_5.listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_simple_expr__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_simple_expr__plan0_optimized.sql index 65e701e3dd..af791bf498 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_simple_expr__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_compute_metrics_node_simple_expr__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- -- Compute Metrics via Expressions SELECT listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_constrain_time_range_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_constrain_time_range_node__plan0.sql index 21d79f30ae..0650194a93 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_constrain_time_range_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_constrain_time_range_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-02T00:00:00] SELECT subq_2.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_constrain_time_range_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_constrain_time_range_node__plan0_optimized.sql index 137bae5f65..78dff8a3af 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_constrain_time_range_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_constrain_time_range_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'ds__day'] -- Metric Time Dimension 'ds' diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimension_with_joined_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimension_with_joined_where_constraint__plan0.sql index a53b66b1c1..e1cae52dd7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimension_with_joined_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimension_with_joined_where_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest',] SELECT subq_4.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimension_with_joined_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimension_with_joined_where_constraint__plan0_optimized.sql index 08f5aa9a14..a454bd9531 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimension_with_joined_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimension_with_joined_where_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0.sql index 007d0aac57..2254d611d2 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..53dc07a0e3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_node__plan0.sql index 8b3794a47b..5d801cb056 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Pass Only Elements: ['bookings',] SELECT subq_0.bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_node__plan0_optimized.sql index 554ce484fb..6bd8bbc9b3 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings',] SELECT diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_node__plan0.sql index 29197c39d7..810f55747e 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT subq_1.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_node__plan0_optimized.sql index 5ee87ba25f..87d2298a5f 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- -- Constrain Output with WHERE SELECT ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql index e8a3b24016..41617b3c74 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_to_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql index dfbf45320a..510ed6ca20 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_window__plan0.sql index 02c8875b37..483a2d69ad 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_window__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql index 46290a43a2..a8e82f0f32 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_with_offset_window__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_without_offset__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_without_offset__plan0.sql index a6b2e3622c..ee51fb7fbe 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_without_offset__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_without_offset__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_5.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_without_offset__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_without_offset__plan0_optimized.sql index 079f6f5209..5099afbba7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_without_offset__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_join_to_time_spine_node_without_offset__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- -- Join to Time Spine Dataset SELECT subq_12.metric_time__day AS metric_time__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_measure_aggregation_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_measure_aggregation_node__plan0.sql index a2fc874608..a544a72707 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_measure_aggregation_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_measure_aggregation_node__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Aggregate Measures SELECT SUM(subq_1.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_measure_aggregation_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_measure_aggregation_node__plan0_optimized.sql index 6e5528a6c9..8e65d6dca7 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_measure_aggregation_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_measure_aggregation_node__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- -- Read Elements From Semantic Model 'bookings_source' -- Pass Only Elements: ['bookings', 'instant_bookings', 'average_booking_value', 'bookers'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_multi_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_multi_join_node__plan0.sql index 74288b057c..a9a534c98b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_multi_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_multi_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_3.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_multi_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_multi_join_node__plan0_optimized.sql index a880de7068..fe3abca276 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_multi_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_multi_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs SELECT subq_9.country_latest AS listing__country_latest diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_order_by_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_order_by_node__plan0.sql index b06170c5ce..9f27905deb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_order_by_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_order_by_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Order By ['ds__day', 'bookings'] SELECT subq_3.ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_order_by_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_order_by_node__plan0_optimized.sql index bcebfe9d5f..15e0abb649 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_order_by_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_order_by_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By ['ds__day', 'bookings'] diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node__plan0.sql index 1d8628cef6..31d5ee69c2 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node__plan0_optimized.sql index 3cc00c2223..158bd92cf6 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_grouping__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_grouping__plan0.sql index dd376606d2..b0da11242c 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_grouping__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_grouping__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_grouping__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_grouping__plan0_optimized.sql index 63dc09dc9a..9f1462a788 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_grouping__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_grouping__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- -- Join on MAX(ds) and ['user'] grouping by None SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_queried_group_by__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_queried_group_by__plan0.sql index 36860fc374..9cfc283286 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_queried_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_queried_group_by__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_0.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql index 0b1b03f831..4d2cab04dc 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_semi_additive_join_node_with_queried_group_by__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- -- Join on MIN(ds) and [] grouping by ds SELECT subq_3.ds__day AS ds__day diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_single_join_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_single_join_node__plan0.sql index 15bec31d75..1fa696b23a 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_single_join_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_single_join_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_1.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_single_join_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_single_join_node__plan0_optimized.sql index a1cd7ac335..38534197cb 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_single_join_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_single_join_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- -- Join Standard Outputs SELECT subq_5.listing AS listing diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_source_node__plan0.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_source_node__plan0.sql index cf384bbdbe..55f1b1b1ef 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_source_node__plan0.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_source_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_source_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_source_node__plan0_optimized.sql index 1ee93a834a..be80732381 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_source_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/Trino/test_source_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- -- Read Elements From Semantic Model 'bookings_source' SELECT 1 AS bookings diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_combine_output_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_combine_output_node__plan0.xml index f3b4638753..357426fcab 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_combine_output_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_combine_output_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_combine_output_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests combining AggregateMeasuresNode. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node__plan0.xml index 0977ce5781..31515e14d6 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.xml index 35bcd3afd3..d10547b4cf 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_multiple_semantic_models__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_multiple_semantic_models +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the combine metrics node for ratio type metrics. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.xml index 224fa33647..b0c0a92265 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_ratio_from_single_semantic_model__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_ratio_from_single_semantic_model +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for ratio type metrics sourced from a single semantic model. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_simple_expr__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_simple_expr__plan0.xml index f693d083f3..caa7d88188 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_simple_expr__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_compute_metrics_node_simple_expr__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_compute_metrics_node_simple_expr +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests the compute metrics node for expr type metrics sourced from a single measure. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_constrain_time_range_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_constrain_time_range_node__plan0.xml index 6176cc9469..238698de4b 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_constrain_time_range_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_constrain_time_range_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_constrain_time_range_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting the ConstrainTimeRangeNode to SQL. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimension_with_joined_where_constraint__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimension_with_joined_where_constraint__plan0.xml index 074fb50317..c180cff2d1 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimension_with_joined_where_constraint__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimension_with_joined_where_constraint__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_dimension_with_joined_where_constraint +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml index 2d8e288ee1..e30f28c1af 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests querying 2 dimensions that require a join. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_node__plan0.xml index 7454c656d7..d325e6faf5 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_filter_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_node__plan0.xml index cf5619eec8..f1578865c1 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_filter_with_where_constraint_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf pass filter node. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml index 8928db3f68..a83cc266da 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_with_offset_to_grain__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_to_grain +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_to_grain. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml index 8928db3f68..2a1a85e9cc 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_with_offset_window__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_with_offset_window +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_without_offset__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_without_offset__plan0.xml index 8928db3f68..8a99de69c1 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_without_offset__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_join_to_time_spine_node_without_offset__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_node_without_offset +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests JoinToTimeSpineNode for a single metric with offset_window. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_aggregation_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_aggregation_node__plan0.xml index 6755985f55..c5338c6333 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_aggregation_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_measure_aggregation_node__plan0.xml @@ -1,3 +1,10 @@ +test_name: test_measure_aggregation_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf measure aggregation node. + + Covers SUM, AVERAGE, SUM_BOOLEAN (transformed to SUM upstream), and COUNT_DISTINCT agg types +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_join_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_join_node__plan0.xml index b57d69bf27..03ccc47a65 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_join_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_multi_join_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_multi_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_order_by_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_order_by_node__plan0.xml index 04959b7430..92989152c2 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_order_by_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_order_by_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_order_by_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a leaf compute metrics node. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node__plan0.xml index 1aad097e04..94c2e74dac 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_grouping__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_grouping__plan0.xml index e574ac76b5..f926bb6583 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_grouping__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_grouping__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_grouping +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode with a window_grouping. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_queried_group_by__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_queried_group_by__plan0.xml index 9f9989cea6..1d602bca94 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_queried_group_by__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_semi_additive_join_node_with_queried_group_by__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_semi_additive_join_node_with_queried_group_by +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan using a SemiAdditiveJoinNode. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_single_join_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_single_join_node__plan0.xml index b9d5298669..b1ed54552d 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_single_join_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_single_join_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_single_join_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 1 dimension. +--- diff --git a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_source_node__plan0.xml b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_source_node__plan0.xml index e96f0a3b94..b21f644d5d 100644 --- a/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_source_node__plan0.xml +++ b/tests_metricflow/snapshots/test_dataflow_to_sql_plan.py/SqlQueryPlan/test_source_node__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_source_node +test_filename: test_dataflow_to_sql_plan.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a single source node. +--- diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql index 58b7761be3..3e44105801 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql index dc3b2de622..0e1bf3ad1e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric__plan0.sql index ecf273f6ed..be8cc56fbd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric__plan0_optimized.sql index 7897f24138..c713e1c18d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql index 050701880f..57abe3cd37 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Order By [] Limit 1 SELECT subq_12.booking__is_instant diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql index d8fa84156d..7fcafc4ada 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Combine Aggregated Outputs -- Order By [] Limit 1 SELECT diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 36a743b7d5..77674d7d11 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql index 14f3a5168d..892fbc1d86 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain__plan0.sql index 75aba4803b..dc86d996c4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain__plan0_optimized.sql index 01998e04e7..2f6868cebc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql index 5c258a4743..4a15fc754a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql index 0adabcc5db..b68c452ecc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window__plan0.sql index 573fbfce44..d8b2ae0313 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window__plan0_optimized.sql index afd37a8346..a68a55b8c2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 7c1434ec44..a3047146c2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql index a53541bac3..b6c7ec13f0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql index 233c22cc2f..d4d692d311 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql index 40ca32a94a..b712a73778 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 71afc56e73..2c81c246ce 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql index 84e29631ce..8f11e3d1a6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_time_filter__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_time_filter__plan0.sql index fec1f47c91..9652195b3e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_time_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql index c67bfc361f..3809ecf88e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_cumulative_metric__plan0.sql index c384bf36f4..6d77fac39a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_cumulative_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_cumulative_metric__plan0_optimized.sql index 4b9b513bb2..abc6a3b00c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_agg_time_dim__plan0.sql index 92af66db4c..7b11fc5c4b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql index 6e331d4e16..bfaa98097d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_one_input_metric__plan0.sql index 5c4ee22ca1..9315e861c7 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql index de4b0b1da5..2d5f68ce4f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_multi_metric_fill_null__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_multi_metric_fill_null__plan0.sql index 480b98fa0c..3ea62da591 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_multi_metric_fill_null__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_multi_metric_fill_null__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__day, subq_10.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_multi_metric_fill_null__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_multi_metric_fill_null__plan0_optimized.sql index 9ab4221680..62325f603a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_multi_metric_fill_null__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_multi_metric_fill_null__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_16.metric_time__day, subq_21.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric__plan0.sql index 0122264b1a..d14a046dcd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric__plan0_optimized.sql index 8d802e9265..013f13b6bc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql index 38abfd9503..23f9ffc4be 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql index 0fab73319b..222bf0df1e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql index f96b3ee476..5e60d5b45c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql index d7d67e9177..a8fe6bd196 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine__plan0.sql index a6d5e3d063..2271dfdb67 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql index 66bbcd2a36..10321ea0bd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql index c652dd8054..3b8a51280c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_6.metric_time__day, subq_11.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql index 29c9e8f1a6..c21bf0dcb8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_18.metric_time__day, subq_23.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_filters__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_filters__plan0.sql index fd7b4bc750..f5d49956e5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_filters__plan0_optimized.sql index bceaae3fc2..95a14dbe8e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets__plan0.sql index ce02d3f754..ddd23b40aa 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets__plan0_optimized.sql index 95482a7759..842508963b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_time_constraint__plan0.sql index 9c0be8d3b7..0075871b86 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_time_constraint__plan0_optimized.sql index 883e2c5d74..12d7d8ceb1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_where_constraint__plan0.sql index b79fd59f9b..864db26762 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_where_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_12.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_where_constraint__plan0_optimized.sql index 1dc4da26fc..61706597d7 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_nested_offsets_with_where_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index ff910ed74f..c1455d1c38 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index b07614dc14..77c9dc5c0d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0.sql index e9ec5732eb..561a961972 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql index de07009dad..18d8a12b85 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_with_agg_time_dim__plan0.sql index 98c2aaf089..5c4a51f5ad 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql index 158bfbdfa2..f0ca447342 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 255d195524..3b56114090 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 56b0a42d94..b23e551f45 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0.sql index 1bdeb88919..e94ac9df9a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0_optimized.sql index a67284e4ba..18024170ad 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_agg_time_dim__plan0.sql index 1fff76a029..cdc4504114 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_agg_time_dim__plan0_optimized.sql index 085f915e3c..75fa8164f1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_time_offset_metric_with_time_constraint__plan0.sql index d97a1ed56d..ca07f0a381 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_time_offset_metric_with_time_constraint__plan0_optimized.sql index 7ad43c2901..7a24aa5787 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/BigQuery/test_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql index 827ae7eeff..a663ed0789 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql index ff652eccbf..2802640eaf 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric__plan0.sql index 9cad895c71..b8bff2a824 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric__plan0_optimized.sql index 7a90d32ec7..a0e745d370 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql index aa6333fc05..34f5a18307 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Order By [] Limit 1 SELECT subq_12.booking__is_instant diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql index 6b1c46eee3..b55fb3a961 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Combine Aggregated Outputs -- Order By [] Limit 1 SELECT diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 2fe274f196..1f5b0606c9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql index a09f18e6e1..025a1b2eb5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain__plan0.sql index 2e940367ea..361e27ddf0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain__plan0_optimized.sql index aa15f38c06..2783219cfc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql index 9dc762a3e9..7a76e14c94 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql index 808ffc27a1..2761eb5135 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window__plan0.sql index 88329d00d3..cfecc0bb19 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window__plan0_optimized.sql index 8eb8c6cbf9..0d6c2437c9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 0b40670060..544def4fa4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql index 7024c46d3a..b2f161dd31 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql index 49d4478446..58c54902a2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql index 3e62b59a02..9daf93a665 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 5f1bfa202f..6df560b1b0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql index a0e28f6a63..781bc3e702 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_time_filter__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_time_filter__plan0.sql index 6d6173f882..755e87c524 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_time_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql index 126872efb8..e1831d9b53 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_cumulative_metric__plan0.sql index 8f195e3850..e5fb618b16 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_cumulative_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_cumulative_metric__plan0_optimized.sql index 8be396c4a4..044002a129 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_agg_time_dim__plan0.sql index 97ea5f3d65..a1b79aa973 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql index 1a7e109f05..26f9413a62 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_one_input_metric__plan0.sql index 52482d8b59..261e0d0cb6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql index 60bbd4728c..92b6ab08fd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_multi_metric_fill_null__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_multi_metric_fill_null__plan0.sql index 6eee550fe3..d860023b22 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_multi_metric_fill_null__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_multi_metric_fill_null__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__day, subq_10.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_multi_metric_fill_null__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_multi_metric_fill_null__plan0_optimized.sql index 6042d3ec26..eeed20a1bc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_multi_metric_fill_null__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_multi_metric_fill_null__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_16.metric_time__day, subq_21.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric__plan0.sql index 1944b5aee0..3ca01ba1dc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric__plan0_optimized.sql index 1498999a60..95ed8c361f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql index bbd320ac3b..f654bcbe17 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql index f53018153d..c96055954d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql index 8a2b5f5f8f..e53b8c26b0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql index b10c0ed06c..172da205b3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine__plan0.sql index 3aba5879ba..a4babfc559 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql index 12c8099228..024faf9541 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql index d29998a98c..7a2aaf5ace 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_6.metric_time__day, subq_11.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql index 3fbce2627b..99ed1b8640 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_18.metric_time__day, subq_23.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_filters__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_filters__plan0.sql index 0e5e489290..c2852502a7 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_filters__plan0_optimized.sql index bceaae3fc2..95a14dbe8e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets__plan0.sql index a692b115a4..d711070bdc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets__plan0_optimized.sql index d392a13fcc..3038b862fb 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_time_constraint__plan0.sql index bf1783afa1..bada09c86c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_time_constraint__plan0_optimized.sql index 5ce260e750..f70dd8c23b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_where_constraint__plan0.sql index bb78281744..51915f2a15 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_where_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_12.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_where_constraint__plan0_optimized.sql index 76818b62f5..5d8b51d4d0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_nested_offsets_with_where_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index bc1cdcecdc..81273e99cf 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 324d26cfec..c14ad191c6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0.sql index cf8bea400b..1c0fe23149 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql index 76767e46c6..2f1ca2a57c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_with_agg_time_dim__plan0.sql index 0b46e69070..b3a9ae897e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql index 87a86d9826..47c9444ae2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 97c146cbeb..b0c0ede114 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 40dda13956..2f7b37c3f6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0.sql index a356026025..4608ff4188 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0_optimized.sql index 58b1be36eb..b2e53e6694 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_agg_time_dim__plan0.sql index ea02464b08..c492bbd6f5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_agg_time_dim__plan0_optimized.sql index 82e7a89339..f2f0eff1e6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_time_offset_metric_with_time_constraint__plan0.sql index a5f6c92502..5c1d9643ea 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_time_offset_metric_with_time_constraint__plan0_optimized.sql index ba6c53ac37..abb1d9e177 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Databricks/test_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql index 30664eaede..31bf2e30f8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql index 76521acebc..3c5b2595de 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric__plan0.sql index 05e4c4584c..7c151b7d9a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric__plan0_optimized.sql index 7a90d32ec7..a0e745d370 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql index 735273f62b..568f8d064d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Order By [] Limit 1 SELECT subq_12.booking__is_instant diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql index 6b1c46eee3..b55fb3a961 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Combine Aggregated Outputs -- Order By [] Limit 1 SELECT diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 1f84264abf..32af99cf7b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql index e1195425ea..127eae1fc0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain__plan0.sql index a9d3e6d977..fd5744f5dd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain__plan0_optimized.sql index aa15f38c06..2783219cfc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql index eb72ea9213..7858c9d112 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql index 808ffc27a1..2761eb5135 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window__plan0.sql index daf3021522..3f94efb1fb 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window__plan0_optimized.sql index 2995f673a7..1fd5b3272a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 6f85a9e19f..153ad3a22e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql index 851b05e511..a282dd56c2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql index 1d66e64171..dd31c62e9b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql index 0c68fbd1a2..9d5b7b23fd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 7871e327c5..35adf51f06 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql index 76ccda3ffe..64911b98bd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_time_filter__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_time_filter__plan0.sql index 9e28f14d4f..42c9222d00 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_time_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql index 92ee63ff36..b0e66ed7be 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_cumulative_metric__plan0.sql index 8d51b413df..33f1151322 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_cumulative_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_cumulative_metric__plan0_optimized.sql index d55d82114b..8061e9fd01 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_agg_time_dim__plan0.sql index d04a641f27..d5bdcc0a28 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql index ee97120d59..c65d640c08 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_one_input_metric__plan0.sql index 380c658a9e..f143f8f130 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql index cfa50604ff..adb577db87 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_multi_metric_fill_null__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_multi_metric_fill_null__plan0.sql index f4cd3a7185..3814a22c3f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_multi_metric_fill_null__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_multi_metric_fill_null__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__day, subq_10.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_multi_metric_fill_null__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_multi_metric_fill_null__plan0_optimized.sql index 6042d3ec26..eeed20a1bc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_multi_metric_fill_null__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_multi_metric_fill_null__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_16.metric_time__day, subq_21.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric__plan0.sql index 2968237130..f615f69ac8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric__plan0_optimized.sql index 1498999a60..95ed8c361f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql index aa0490fb4b..ae6f73d7e5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql index 94a07bed7d..7a509eadb3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql index 5ac836a079..67d1bc4ee1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql index b10c0ed06c..172da205b3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine__plan0.sql index 4fe4b35f3c..473e890f05 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql index 12c8099228..024faf9541 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql index 7f9b46ce11..f10dc83fa4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_6.metric_time__day, subq_11.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql index 3fbce2627b..99ed1b8640 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_18.metric_time__day, subq_23.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_filters__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_filters__plan0.sql index 3e2f1a6361..cef4cca9b2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_filters__plan0_optimized.sql index bceaae3fc2..95a14dbe8e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets__plan0.sql index 6c69cb987f..0c8d3baf2e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets__plan0_optimized.sql index fd6f165b33..8db033ffad 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_time_constraint__plan0.sql index c0b1ea0b18..77866264d6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_time_constraint__plan0_optimized.sql index df8acf3b4d..16d3fe0037 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_where_constraint__plan0.sql index a532fe0b30..7d35c8aa15 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_where_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_12.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_where_constraint__plan0_optimized.sql index 767f991871..ba80ca377f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_nested_offsets_with_where_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index 5f3940635c..8c1148d387 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 324d26cfec..c14ad191c6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_multiple_granularities__plan0.sql index 8a62bf7c11..5b3fa15ceb 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql index 76767e46c6..2f1ca2a57c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_with_agg_time_dim__plan0.sql index 8734e9a26a..8b840d4fdf 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql index 87a86d9826..47c9444ae2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 2faca4b735..32ee63b03f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 989b83ee2f..9238964f03 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_multiple_granularities__plan0.sql index 92f1870c03..a12398ea1e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_multiple_granularities__plan0_optimized.sql index 7a9df9d3d5..b8cdbc28bf 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_agg_time_dim__plan0.sql index 10520fd03d..fb931c5229 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_agg_time_dim__plan0_optimized.sql index cacae6cc3a..4b39ae1f96 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_time_offset_metric_with_time_constraint__plan0.sql index a3c227a694..692b162593 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_time_offset_metric_with_time_constraint__plan0_optimized.sql index d1f30b244b..1f3204d101 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/DuckDB/test_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql index 12fc0660dd..8fe9be605c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql index 24ee4c630c..2330eb2848 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric__plan0.sql index 05e4c4584c..7c151b7d9a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric__plan0_optimized.sql index 7a90d32ec7..a0e745d370 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql index 735273f62b..568f8d064d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Order By [] Limit 1 SELECT subq_12.booking__is_instant diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql index 6b1c46eee3..b55fb3a961 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Combine Aggregated Outputs -- Order By [] Limit 1 SELECT diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 4ad21caa1e..e7d2e80a18 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql index 7774b72688..8b3ae46c19 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain__plan0.sql index a9d3e6d977..fd5744f5dd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain__plan0_optimized.sql index aa15f38c06..2783219cfc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql index eb72ea9213..7858c9d112 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql index 808ffc27a1..2761eb5135 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window__plan0.sql index c38796f09c..894ee16b91 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window__plan0_optimized.sql index 33e8eda544..2ab158c24b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0.sql index fbae91f2a9..d6ca3377b9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql index 91c4a4a2c5..52a8ea63a1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql index 178cf2de2a..2fc5dc7489 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql index 8ea8e07a76..317d270094 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index d50cfe18d9..5d16cf63f8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql index 41dbd9a78a..e8c60395eb 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_time_filter__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_time_filter__plan0.sql index a184f51ca9..a683fc704f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_time_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql index d5bb9dafff..669be9897e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_cumulative_metric__plan0.sql index 6d78aa9c64..2060e68e60 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_cumulative_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_cumulative_metric__plan0_optimized.sql index bbe67a8031..83c9b96471 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_agg_time_dim__plan0.sql index cc025f4b8c..0a060dde6d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql index 57163ee2cc..47fc8b3622 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_one_input_metric__plan0.sql index bbb49e0a31..5de8488f2d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql index d66bd748ee..0a08f69fd3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_multi_metric_fill_null__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_multi_metric_fill_null__plan0.sql index f4cd3a7185..3814a22c3f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_multi_metric_fill_null__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_multi_metric_fill_null__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__day, subq_10.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_multi_metric_fill_null__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_multi_metric_fill_null__plan0_optimized.sql index 6042d3ec26..eeed20a1bc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_multi_metric_fill_null__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_multi_metric_fill_null__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_16.metric_time__day, subq_21.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric__plan0.sql index 2968237130..f615f69ac8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric__plan0_optimized.sql index 1498999a60..95ed8c361f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql index 13cc66980b..72685b7ff1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql index 8b21f2c359..92b13ee6ba 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql index 5ac836a079..67d1bc4ee1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql index b10c0ed06c..172da205b3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine__plan0.sql index 4fe4b35f3c..473e890f05 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql index 12c8099228..024faf9541 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql index 7f9b46ce11..f10dc83fa4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_6.metric_time__day, subq_11.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql index 3fbce2627b..99ed1b8640 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_18.metric_time__day, subq_23.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_filters__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_filters__plan0.sql index 3e2f1a6361..cef4cca9b2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_filters__plan0_optimized.sql index bceaae3fc2..95a14dbe8e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets__plan0.sql index 86b254f0a9..2e5c7466aa 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets__plan0_optimized.sql index f31f2877a4..f6ccd9e702 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_time_constraint__plan0.sql index bdba4860e0..b92557b337 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_time_constraint__plan0_optimized.sql index b8209c2676..15ca71a8c3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_where_constraint__plan0.sql index 777ebd13a2..c2c4914bee 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_where_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_12.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_where_constraint__plan0_optimized.sql index 77718a3822..8ec7792e07 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_nested_offsets_with_where_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index 5f3940635c..8c1148d387 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 324d26cfec..c14ad191c6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0.sql index 8a62bf7c11..5b3fa15ceb 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql index 76767e46c6..2f1ca2a57c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_with_agg_time_dim__plan0.sql index 8734e9a26a..8b840d4fdf 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql index 87a86d9826..47c9444ae2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 77b515c67d..9ca1a90c00 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 8ee9b37ab4..ab92cda3b1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0.sql index 8a46329ece..71726abb15 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0_optimized.sql index d13f6c1eee..731a97a771 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_agg_time_dim__plan0.sql index a7b8e46f66..afe7e72419 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_agg_time_dim__plan0_optimized.sql index 284d3fc1f5..2ac746e5bd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_time_offset_metric_with_time_constraint__plan0.sql index ca0633f023..1b8fbde48e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_time_offset_metric_with_time_constraint__plan0_optimized.sql index 9a34957a36..4a198f9230 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Postgres/test_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql index 4d69a03994..52cbc0eb91 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql index ff652eccbf..2802640eaf 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric__plan0.sql index 713a1ffc06..e1182b4e1d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric__plan0_optimized.sql index 7a90d32ec7..a0e745d370 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql index 48d371e340..267c114bbd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Order By [] Limit 1 SELECT subq_12.booking__is_instant diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql index 6b1c46eee3..b55fb3a961 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Combine Aggregated Outputs -- Order By [] Limit 1 SELECT diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 2fe274f196..1f5b0606c9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql index a09f18e6e1..025a1b2eb5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain__plan0.sql index 87688d112e..d6759f3f7a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain__plan0_optimized.sql index aa15f38c06..2783219cfc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql index be71703b1c..cbfee5f5f5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql index 808ffc27a1..2761eb5135 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window__plan0.sql index a29a832f2d..425b41c810 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window__plan0_optimized.sql index 8eb8c6cbf9..0d6c2437c9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 74fffe4c7f..f32fcdefe8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql index 7024c46d3a..b2f161dd31 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql index 581fd0e789..78972ede5f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql index 3e62b59a02..9daf93a665 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 4ada8feb60..e087dc2cd4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql index a0e28f6a63..781bc3e702 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_time_filter__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_time_filter__plan0.sql index 93b4d660d8..6fcce08cde 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_time_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql index 126872efb8..e1831d9b53 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_cumulative_metric__plan0.sql index 7d11897fc7..f65689a731 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_cumulative_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_cumulative_metric__plan0_optimized.sql index 8be396c4a4..044002a129 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_agg_time_dim__plan0.sql index ad6e88183b..afbe3fa783 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql index 1a7e109f05..26f9413a62 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_one_input_metric__plan0.sql index 684a0f26a9..6af2b32427 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql index 60bbd4728c..92b6ab08fd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_multi_metric_fill_null__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_multi_metric_fill_null__plan0.sql index 2936235984..8d2f985ae2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_multi_metric_fill_null__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_multi_metric_fill_null__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__day, subq_10.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_multi_metric_fill_null__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_multi_metric_fill_null__plan0_optimized.sql index 6042d3ec26..eeed20a1bc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_multi_metric_fill_null__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_multi_metric_fill_null__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_16.metric_time__day, subq_21.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric__plan0.sql index 131bef449b..e895f945a6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric__plan0_optimized.sql index 1498999a60..95ed8c361f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql index 77e4d19248..f960dc6da6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql index f53018153d..c96055954d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql index 15a016badb..5b52bdf5e9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql index b10c0ed06c..172da205b3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine__plan0.sql index a8db95ba79..97b5fd0984 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql index 12c8099228..024faf9541 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql index fa382c4993..5f2e333e44 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_6.metric_time__day, subq_11.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql index 3fbce2627b..99ed1b8640 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_18.metric_time__day, subq_23.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_filters__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_filters__plan0.sql index 8ae8ed0bb6..bd40e8be25 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_filters__plan0_optimized.sql index bceaae3fc2..95a14dbe8e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets__plan0.sql index 03f4118d5d..93f6cba154 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets__plan0_optimized.sql index d392a13fcc..3038b862fb 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_time_constraint__plan0.sql index 13ec96fc52..253f546b0f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_time_constraint__plan0_optimized.sql index 5ce260e750..f70dd8c23b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_where_constraint__plan0.sql index 5be47d98a0..8c0ff04cd2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_where_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_12.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_where_constraint__plan0_optimized.sql index 76818b62f5..5d8b51d4d0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_nested_offsets_with_where_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index de04cbafed..e080aba623 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 324d26cfec..c14ad191c6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0.sql index cdd2a747bd..c0c3196a42 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql index 76767e46c6..2f1ca2a57c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_with_agg_time_dim__plan0.sql index 4b6fd05c9b..fb6ed224a9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql index 87a86d9826..47c9444ae2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 4dd9a7cb3f..cd115529b4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 40dda13956..2f7b37c3f6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0.sql index 79cd48a29a..192c9774f8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0_optimized.sql index 58b1be36eb..b2e53e6694 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_agg_time_dim__plan0.sql index 5a5d745cc6..7c170a3fe6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_agg_time_dim__plan0_optimized.sql index 82e7a89339..f2f0eff1e6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_time_offset_metric_with_time_constraint__plan0.sql index d847c8018f..f855aaa32e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_time_offset_metric_with_time_constraint__plan0_optimized.sql index ba6c53ac37..abb1d9e177 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Redshift/test_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql index 010e0ae076..6960c8174c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql index ff652eccbf..2802640eaf 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric__plan0.sql index 3061b99e19..f2a92c2bfc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric__plan0_optimized.sql index 7a90d32ec7..a0e745d370 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql index 4253fd235f..0c28642211 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Order By [] Limit 1 SELECT subq_12.booking__is_instant diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql index 6b1c46eee3..b55fb3a961 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Combine Aggregated Outputs -- Order By [] Limit 1 SELECT diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 2fe274f196..1f5b0606c9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql index a09f18e6e1..025a1b2eb5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain__plan0.sql index 5290ac6df3..471f9f7e52 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain__plan0_optimized.sql index aa15f38c06..2783219cfc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql index a5aeefa790..a22a4215f4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql index 808ffc27a1..2761eb5135 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window__plan0.sql index 22ca211b78..18e618d1c8 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window__plan0_optimized.sql index 8eb8c6cbf9..0d6c2437c9 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 0124c7102e..47397dbc9c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql index 7024c46d3a..b2f161dd31 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql index 45404aae17..7f278a2b1d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql index 3e62b59a02..9daf93a665 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index d025b10978..8131f772c0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql index a0e28f6a63..781bc3e702 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_time_filter__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_time_filter__plan0.sql index 454fce5a44..dd33b1a0da 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_time_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql index 126872efb8..e1831d9b53 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_cumulative_metric__plan0.sql index 6945e41530..95065072f7 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_cumulative_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_cumulative_metric__plan0_optimized.sql index 8be396c4a4..044002a129 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_agg_time_dim__plan0.sql index 9437092dd4..9fa2a7182a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql index 1a7e109f05..26f9413a62 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_one_input_metric__plan0.sql index 3005816b74..bdcbf25cbd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql index 60bbd4728c..92b6ab08fd 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_multi_metric_fill_null__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_multi_metric_fill_null__plan0.sql index fbe272415a..facf862da6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_multi_metric_fill_null__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_multi_metric_fill_null__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__day, subq_10.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_multi_metric_fill_null__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_multi_metric_fill_null__plan0_optimized.sql index 6042d3ec26..eeed20a1bc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_multi_metric_fill_null__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_multi_metric_fill_null__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_16.metric_time__day, subq_21.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric__plan0.sql index fef028c1a2..95d95376a3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric__plan0_optimized.sql index 1498999a60..95ed8c361f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql index 43aff53008..72a8f129f5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql index f53018153d..c96055954d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql index 767ed7c015..8318978d48 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql index b10c0ed06c..172da205b3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine__plan0.sql index cd7f54f71c..73d9f13b4c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql index 12c8099228..024faf9541 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql index 9705f9afbe..a1e403c315 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_6.metric_time__day, subq_11.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql index 3fbce2627b..99ed1b8640 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_18.metric_time__day, subq_23.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_filters__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_filters__plan0.sql index cead3aab72..1c7c321b94 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_filters__plan0_optimized.sql index bceaae3fc2..95a14dbe8e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets__plan0.sql index 116816a3e2..37946817f5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets__plan0_optimized.sql index d392a13fcc..3038b862fb 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_time_constraint__plan0.sql index c1169c26fb..d42d45de88 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_time_constraint__plan0_optimized.sql index 5ce260e750..f70dd8c23b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_where_constraint__plan0.sql index 9b11a266f0..ef7e5ef080 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_where_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_12.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_where_constraint__plan0_optimized.sql index 76818b62f5..5d8b51d4d0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_nested_offsets_with_where_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index 874baf9232..22e70d2af7 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 324d26cfec..c14ad191c6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0.sql index 9ba2ba9c0a..35028c335d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql index 76767e46c6..2f1ca2a57c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_with_agg_time_dim__plan0.sql index 179b098943..f286cba875 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql index 87a86d9826..47c9444ae2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 59fcf0f2ce..2f7d3a9cf5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 40dda13956..2f7b37c3f6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0.sql index 041daf1029..1dac1e70e5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0_optimized.sql index 58b1be36eb..b2e53e6694 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_agg_time_dim__plan0.sql index 896d161dff..959e6bd4a1 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_agg_time_dim__plan0_optimized.sql index 82e7a89339..f2f0eff1e6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_time_offset_metric_with_time_constraint__plan0.sql index a1a6c46c56..816d9d4133 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_time_offset_metric_with_time_constraint__plan0_optimized.sql index ba6c53ac37..abb1d9e177 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Snowflake/test_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql index 3d30faf3d2..c8641824f5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql index 386c6b7f41..6cc27fec1a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_cumulative_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric__plan0.sql index 5876b52feb..b66fa9b450 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric__plan0_optimized.sql index 7a90d32ec7..a0e745d370 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql index de48d5aa70..023b392c74 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Order By [] Limit 1 SELECT subq_12.booking__is_instant diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql index 6b1c46eee3..b55fb3a961 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_that_defines_the_same_alias_in_different_components__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_derived_metric_that_defines_the_same_alias_in_different_components +test_filename: test_derived_metric_rendering.py +docstring: + Tests querying a derived metric which give the same alias to its components. +--- -- Combine Aggregated Outputs -- Order By [] Limit 1 SELECT diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql index 6ba659133b..1b5c1d0108 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql index 99d41505e0..a208dc78ee 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_month_dimension_and_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_month_dimension_and_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain__plan0.sql index 2e3eaf8475..087d2ab9b0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain__plan0_optimized.sql index aa15f38c06..2783219cfc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql index 25b6c37530..320c80d782 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql index 808ffc27a1..2761eb5135 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__week diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window__plan0.sql index 219b53a81e..96ea85a6d4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window__plan0_optimized.sql index 2b4d820076..019ccb0b7e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0.sql index 7a7f0cef1f..ed6739094b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql index bffa9809e6..1b797b2292 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__quarter diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql index ff70de61e8..cb736153cc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql index c7136d5198..868a3fe869 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql index 9f5f5a9b1e..b1958723fc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql index 86c6206458..c28a234b0b 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_offset_to_grain_and_granularity +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__year diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_time_filter__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_time_filter__plan0.sql index 76d85a97ae..ae16abc3a3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_time_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_time_filter__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql index d68ebf6965..c4960a19da 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_metric_with_offset_window_and_time_filter__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_metric_with_offset_window_and_time_filter +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_cumulative_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_cumulative_metric__plan0.sql index 5e647c5106..27a88e00a0 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_cumulative_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_cumulative_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_cumulative_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_cumulative_metric__plan0_optimized.sql index f840ae4582..12bafb04a4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_cumulative_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_cumulative_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_cumulative_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_agg_time_dim__plan0.sql index fe961785b5..c82556d327 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql index f0f24eca1c..6ad8395e46 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_one_input_metric__plan0.sql index 385bcc0ba0..3ffd1fe6a6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql index 57c8a47d84..4f6deaac74 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_derived_offset_metric_with_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_offset_metric_with_one_input_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_multi_metric_fill_null__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_multi_metric_fill_null__plan0.sql index 895354148b..4cf6bee291 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_multi_metric_fill_null__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_multi_metric_fill_null__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_5.metric_time__day, subq_10.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_multi_metric_fill_null__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_multi_metric_fill_null__plan0_optimized.sql index 6042d3ec26..eeed20a1bc 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_multi_metric_fill_null__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_multi_metric_fill_null__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multi_metric_fill_null +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_16.metric_time__day, subq_21.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric__plan0.sql index 9e6f3ea4b5..849f793835 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric__plan0_optimized.sql index 1498999a60..95ed8c361f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql index 080be3077a..9ca9a9c98f 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql index ce5a3209e3..f4590d19e2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_offset_with_joined_where_constraint_not_selected__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_offset_with_joined_where_constraint_not_selected +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql index 93ca864b6c..ad3bb76bf2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql index b10c0ed06c..172da205b3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_derived_metric_with_offset_multiple_input_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_derived_metric_with_offset_multiple_input_metrics +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine__plan0.sql index b0f95755ec..89efca2309 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql index 12c8099228..024faf9541 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql index 1576c6b077..7d8bd53ce4 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine_multi_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_6.metric_time__day, subq_11.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql index 3fbce2627b..99ed1b8640 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_fill_nulls_without_time_spine_multi_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_fill_nulls_without_time_spine_multi_metric +test_filename: test_derived_metric_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_18.metric_time__day, subq_23.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_filters__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_filters__plan0.sql index f5bab3511c..9b58d7208a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_filters__plan0_optimized.sql index bceaae3fc2..95a14dbe8e 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_nested_filters +test_filename: test_derived_metric_rendering.py +docstring: + Tests derived metric rendering for a nested derived metric with filters on the outer metric spec. +--- -- Compute Metrics via Expressions SELECT instant_lux_booking_value_rate AS instant_lux_booking_value_rate diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets__plan0.sql index 44af827d27..71e5a8a4e5 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets__plan0_optimized.sql index 83038dfd25..96dfe87f37 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_time_constraint__plan0.sql index 7f06fe45be..710a19e7fa 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_time_constraint__plan0_optimized.sql index 103e42fb2e..be656dd703 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_where_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_where_constraint__plan0.sql index 6245df2b52..7eb1a0440a 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_where_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_where_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_12.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_where_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_where_constraint__plan0_optimized.sql index 610dfdee20..1a23cb4d2c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_where_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_nested_offsets_with_where_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_nested_offsets_with_where_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql index efca4b065f..f4b03b2840 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 324d26cfec..c14ad191c6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0.sql index 3491cd1852..9a762fe336 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql index 76767e46c6..2f1ca2a57c 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_to_grain_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset to grain metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_with_agg_time_dim__plan0.sql index 29c0d4d062..82c7e012c6 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql index 87a86d9826..47c9444ae2 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_to_grain_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql index 8e231fa1df..cc68fa2b47 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT subq_15.metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql index 66e288eead..77476a4dfe 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_filter_and_query_have_different_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_filter_and_query_have_different_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with one granularity and filtered by a different one. +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_multiple_granularities__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_multiple_granularities__plan0.sql index 1dc6e47519..73d4c4e4aa 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_multiple_granularities__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_multiple_granularities__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_multiple_granularities__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_multiple_granularities__plan0_optimized.sql index 183eb8a765..76422cd955 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_multiple_granularities__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_metric_multiple_granularities__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_offset_window_metric_multiple_granularities +test_filename: test_derived_metric_rendering.py +docstring: + Test a query where an offset window metric is queried with multiple granularities. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_agg_time_dim__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_agg_time_dim__plan0.sql index acfa5e5aeb..63e0f59e96 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_agg_time_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_agg_time_dim__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_agg_time_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_agg_time_dim__plan0_optimized.sql index 3b8fc2c3cc..589e2603c3 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_agg_time_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_agg_time_dim__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_agg_time_dim +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__ds__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_time_offset_metric_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_time_offset_metric_with_time_constraint__plan0.sql index a58a3aa8d4..9feb0bc579 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_time_offset_metric_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_time_offset_metric_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_time_offset_metric_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_time_offset_metric_with_time_constraint__plan0_optimized.sql index 6d94d571a2..0b8985b04d 100644 --- a/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_time_offset_metric_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_derived_metric_rendering.py/SqlQueryPlan/Trino/test_time_offset_metric_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_time_offset_metric_with_time_constraint +test_filename: test_derived_metric_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimension_values_with_a_join_and_a_filter__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimension_values_with_a_join_and_a_filter__plan0.sql index d2d2f5e38e..ad604d2248 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimension_values_with_a_join_and_a_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimension_values_with_a_join_and_a_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_4.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql index 8710b3d2f6..6453db3051 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0.sql index 63f88a3bf1..9abf4f0688 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0_optimized.sql index 4365193bed..6ce68105cd 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/BigQuery/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimension_values_with_a_join_and_a_filter__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimension_values_with_a_join_and_a_filter__plan0.sql index f0b84e8e19..72b01bbf71 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimension_values_with_a_join_and_a_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimension_values_with_a_join_and_a_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_4.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql index 8710b3d2f6..6453db3051 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0.sql index 5907829912..95159176a9 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..5b8ece1d5a 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Databricks/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimension_values_with_a_join_and_a_filter__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimension_values_with_a_join_and_a_filter__plan0.sql index d1d3afb12c..79cfb7d768 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimension_values_with_a_join_and_a_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimension_values_with_a_join_and_a_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_4.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql index 8710b3d2f6..6453db3051 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0.sql index e4d9c4cec1..c573c05f41 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..5b8ece1d5a 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/DuckDB/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimension_values_with_a_join_and_a_filter__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimension_values_with_a_join_and_a_filter__plan0.sql index d1d3afb12c..79cfb7d768 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimension_values_with_a_join_and_a_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimension_values_with_a_join_and_a_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_4.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql index 8710b3d2f6..6453db3051 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0.sql index e4d9c4cec1..c573c05f41 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..5b8ece1d5a 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Postgres/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimension_values_with_a_join_and_a_filter__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimension_values_with_a_join_and_a_filter__plan0.sql index 8645ee35ba..a14686d654 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimension_values_with_a_join_and_a_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimension_values_with_a_join_and_a_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_4.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql index 8710b3d2f6..6453db3051 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0.sql index 11790f4d9c..44189fdb6f 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..5b8ece1d5a 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Redshift/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimension_values_with_a_join_and_a_filter__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimension_values_with_a_join_and_a_filter__plan0.sql index e708f32d57..d081499930 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimension_values_with_a_join_and_a_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimension_values_with_a_join_and_a_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_4.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql index 8710b3d2f6..6453db3051 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0.sql index cd3786df0e..0b1fcf6fa6 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..5b8ece1d5a 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Snowflake/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimension_values_with_a_join_and_a_filter__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimension_values_with_a_join_and_a_filter__plan0.sql index 47814b943d..6e02424ec3 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimension_values_with_a_join_and_a_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimension_values_with_a_join_and_a_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_4.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql index 8710b3d2f6..6453db3051 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimension_values_with_a_join_and_a_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0.sql index 007d0aac57..d252f7bb57 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT subq_3.listing__is_lux_latest diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0_optimized.sql index 96c5d5bb3a..5b8ece1d5a 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/Trino/test_dimensions_requiring_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest'] SELECT diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimension_values_with_a_join_and_a_filter__plan0.xml b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimension_values_with_a_join_and_a_filter__plan0.xml index 31ec4e8cdb..283b724d08 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimension_values_with_a_join_and_a_filter__plan0.xml +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimension_values_with_a_join_and_a_filter__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_dimension_values_with_a_join_and_a_filter +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join and a filter. +--- diff --git a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml index 2d8e288ee1..98356855c9 100644 --- a/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml +++ b/tests_metricflow/snapshots/test_distinct_values_to_sql.py/SqlQueryPlan/test_dimensions_requiring_join__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_dimensions_requiring_join +test_filename: test_distinct_values_to_sql.py +docstring: + Tests querying 2 dimensions that require a join. +--- diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_approximate_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_approximate_continuous_percentile_expr__plan0.sql index 895365b05e..a8b88c13a6 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_approximate_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_approximate_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_approximate_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the approximate continuous percentile expression in a query. +--- -- Test Approximate Continuous Percentile Expression SELECT APPROX_QUANTILES(a.col0, 2)[OFFSET(1)] AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_cast_to_timestamp__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_cast_to_timestamp__plan0.sql index aea8d6da24..54696c35c4 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_cast_to_timestamp__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_cast_to_timestamp__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cast_to_timestamp +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the cast to timestamp expression in a query. +--- -- Test Cast to Timestamp Expression SELECT CAST('2020-01-01' AS DATETIME) AS col0 diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_generate_uuid__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_generate_uuid__plan0.sql index c5a3f8af0d..59729d166e 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_generate_uuid__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/BigQuery/test_generate_uuid__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_generate_uuid +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the generate uuid expression in a query. +--- -- Test Generate UUID Expression SELECT GENERATE_UUID() AS uuid diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_approximate_discrete_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_approximate_discrete_percentile_expr__plan0.sql index b9ca1c2523..c3d449bee4 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_approximate_discrete_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_approximate_discrete_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_approximate_discrete_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the approximate discrete percentile expression in a query. +--- -- Test Approximate Discrete Percentile Expression SELECT APPROX_PERCENTILE(a.col0, 0.5) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_cast_to_timestamp__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_cast_to_timestamp__plan0.sql index c47396730d..2469a78b87 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_cast_to_timestamp__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_cast_to_timestamp__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cast_to_timestamp +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the cast to timestamp expression in a query. +--- -- Test Cast to Timestamp Expression SELECT CAST('2020-01-01' AS TIMESTAMP) AS col0 diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_continuous_percentile_expr__plan0.sql index 7c75a9b286..0aefd17ee2 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the continuous percentile expression in a query. +--- -- Test Continuous Percentile Expression SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_generate_uuid__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_generate_uuid__plan0.sql index 4ec99ae030..38b3e5459c 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_generate_uuid__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Databricks/test_generate_uuid__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_generate_uuid +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the generate uuid expression in a query. +--- -- Test Generate UUID Expression SELECT UUID() AS uuid diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_approximate_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_approximate_continuous_percentile_expr__plan0.sql index ca1e6ab7a9..4fffd2591e 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_approximate_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_approximate_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_approximate_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the approximate continuous percentile expression in a query. +--- -- Test Approximate Continuous Percentile Expression SELECT approx_quantile(a.col0, 0.5) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_cast_to_timestamp__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_cast_to_timestamp__plan0.sql index c47396730d..2469a78b87 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_cast_to_timestamp__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_cast_to_timestamp__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cast_to_timestamp +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the cast to timestamp expression in a query. +--- -- Test Cast to Timestamp Expression SELECT CAST('2020-01-01' AS TIMESTAMP) AS col0 diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_continuous_percentile_expr__plan0.sql index 7c75a9b286..0aefd17ee2 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the continuous percentile expression in a query. +--- -- Test Continuous Percentile Expression SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_discrete_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_discrete_percentile_expr__plan0.sql index da3b2e8628..0f27777229 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_discrete_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_discrete_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_discrete_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the discrete percentile expression in a query. +--- -- Test Discrete Percentile Expression SELECT PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_generate_uuid__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_generate_uuid__plan0.sql index 2905cc51b1..ed72a6186e 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_generate_uuid__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/DuckDB/test_generate_uuid__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_generate_uuid +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the generate uuid expression in a query. +--- -- Test Generate UUID Expression SELECT GEN_RANDOM_UUID() AS uuid diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_cast_to_timestamp__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_cast_to_timestamp__plan0.sql index c47396730d..2469a78b87 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_cast_to_timestamp__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_cast_to_timestamp__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cast_to_timestamp +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the cast to timestamp expression in a query. +--- -- Test Cast to Timestamp Expression SELECT CAST('2020-01-01' AS TIMESTAMP) AS col0 diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_continuous_percentile_expr__plan0.sql index 7c75a9b286..0aefd17ee2 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the continuous percentile expression in a query. +--- -- Test Continuous Percentile Expression SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_discrete_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_discrete_percentile_expr__plan0.sql index da3b2e8628..0f27777229 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_discrete_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_discrete_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_discrete_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the discrete percentile expression in a query. +--- -- Test Discrete Percentile Expression SELECT PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_generate_uuid__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_generate_uuid__plan0.sql index 2905cc51b1..ed72a6186e 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_generate_uuid__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Postgres/test_generate_uuid__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_generate_uuid +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the generate uuid expression in a query. +--- -- Test Generate UUID Expression SELECT GEN_RANDOM_UUID() AS uuid diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_approximate_discrete_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_approximate_discrete_percentile_expr__plan0.sql index efc54ecd08..fa779e3357 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_approximate_discrete_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_approximate_discrete_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_approximate_discrete_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the approximate discrete percentile expression in a query. +--- -- Test Approximate Discrete Percentile Expression SELECT APPROXIMATE PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_cast_to_timestamp__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_cast_to_timestamp__plan0.sql index c47396730d..2469a78b87 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_cast_to_timestamp__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_cast_to_timestamp__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cast_to_timestamp +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the cast to timestamp expression in a query. +--- -- Test Cast to Timestamp Expression SELECT CAST('2020-01-01' AS TIMESTAMP) AS col0 diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_continuous_percentile_expr__plan0.sql index 7c75a9b286..0aefd17ee2 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the continuous percentile expression in a query. +--- -- Test Continuous Percentile Expression SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_generate_uuid__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_generate_uuid__plan0.sql index 2bee48ccaf..90036d94c0 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_generate_uuid__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Redshift/test_generate_uuid__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_generate_uuid +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the generate uuid expression in a query. +--- -- Test Generate UUID Expression SELECT CONCAT(CAST(RANDOM()*100000000 AS INT)::VARCHAR,CAST(RANDOM()*100000000 AS INT)::VARCHAR) AS uuid diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_approximate_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_approximate_continuous_percentile_expr__plan0.sql index 7e18e76b47..91e5eb29f9 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_approximate_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_approximate_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_approximate_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the approximate continuous percentile expression in a query. +--- -- Test Approximate Continuous Percentile Expression SELECT APPROX_PERCENTILE(a.col0, 0.5) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_cast_to_timestamp__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_cast_to_timestamp__plan0.sql index c47396730d..2469a78b87 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_cast_to_timestamp__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_cast_to_timestamp__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cast_to_timestamp +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the cast to timestamp expression in a query. +--- -- Test Cast to Timestamp Expression SELECT CAST('2020-01-01' AS TIMESTAMP) AS col0 diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_continuous_percentile_expr__plan0.sql index 7c75a9b286..0aefd17ee2 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the continuous percentile expression in a query. +--- -- Test Continuous Percentile Expression SELECT PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_discrete_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_discrete_percentile_expr__plan0.sql index da3b2e8628..0f27777229 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_discrete_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_discrete_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_discrete_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the discrete percentile expression in a query. +--- -- Test Discrete Percentile Expression SELECT PERCENTILE_DISC(0.5) WITHIN GROUP (ORDER BY (a.col0)) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_generate_uuid__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_generate_uuid__plan0.sql index 72195d45ae..065eb53bd7 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_generate_uuid__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Snowflake/test_generate_uuid__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_generate_uuid +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the generate uuid expression in a query. +--- -- Test Generate UUID Expression SELECT UUID_STRING() AS uuid diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_approximate_continuous_percentile_expr__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_approximate_continuous_percentile_expr__plan0.sql index 5ad435c9e1..d0a3f41b49 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_approximate_continuous_percentile_expr__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_approximate_continuous_percentile_expr__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_approximate_continuous_percentile_expr +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the approximate continuous percentile expression in a query. +--- -- Test Approximate Continuous Percentile Expression SELECT approx_percentile(a.col0, 0.5) AS col0_percentile diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_cast_to_timestamp__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_cast_to_timestamp__plan0.sql index c47396730d..2469a78b87 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_cast_to_timestamp__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_cast_to_timestamp__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_cast_to_timestamp +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the cast to timestamp expression in a query. +--- -- Test Cast to Timestamp Expression SELECT CAST('2020-01-01' AS TIMESTAMP) AS col0 diff --git a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_generate_uuid__plan0.sql b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_generate_uuid__plan0.sql index ccdd1213e8..582f5dd700 100644 --- a/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_generate_uuid__plan0.sql +++ b/tests_metricflow/snapshots/test_engine_specific_rendering.py/SqlQueryPlan/Trino/test_generate_uuid__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_generate_uuid +test_filename: test_engine_specific_rendering.py +docstring: + Tests rendering of the generate uuid expression in a query. +--- -- Test Generate UUID Expression SELECT uuid() AS uuid diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 10e1ce0068..34cc439e31 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- 2019-11-25T00:00:00 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 3277f0473d..f04fc79513 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension +test_filename: test_fill_nulls_with_0.py +--- metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- 2019-12-01T00:00:00 True 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt index 82824f664e..6f1e747281 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_custom_grain_in_group_by +test_filename: test_fill_nulls_with_0.py +--- booking__ds__martian_day bookings_join_to_time_spine -------------------------- ----------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt index 81e67fd874..41f7225a3e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt index ce17a585db..d9496fabd6 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_0.py +--- booking__ds__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt index 81e67fd874..c7c2e46f6a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt index 376133d04d..a8724f2db2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day archived_users_join_to_time_spine ------------------- ----------------------------------- 2020-01-01T00:00:00 12 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ae8abac1e2..998ef403ed 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 ------------------- ---------------------------- 2019-11-25T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt index c63eb2656b..820aee54a1 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_0.py +--- metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- 2019-01-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt index 76b6578d5d..44474282b2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/BigQuery/test_simple_join_to_time_spine__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- 2019-11-27T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 10e1ce0068..34cc439e31 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- 2019-11-25T00:00:00 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 3277f0473d..f04fc79513 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension +test_filename: test_fill_nulls_with_0.py +--- metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- 2019-12-01T00:00:00 True 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt index 82824f664e..6f1e747281 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_custom_grain_in_group_by +test_filename: test_fill_nulls_with_0.py +--- booking__ds__martian_day bookings_join_to_time_spine -------------------------- ----------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt index 81e67fd874..41f7225a3e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt index ce17a585db..d9496fabd6 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_0.py +--- booking__ds__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt index 81e67fd874..c7c2e46f6a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt index 376133d04d..a8724f2db2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day archived_users_join_to_time_spine ------------------- ----------------------------------- 2020-01-01T00:00:00 12 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ae8abac1e2..998ef403ed 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 ------------------- ---------------------------- 2019-11-25T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt index c63eb2656b..820aee54a1 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_0.py +--- metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- 2019-01-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt index 76b6578d5d..44474282b2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Databricks/test_simple_join_to_time_spine__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- 2019-11-27T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 10e1ce0068..34cc439e31 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- 2019-11-25T00:00:00 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index c59590b747..e53389bcbd 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension +test_filename: test_fill_nulls_with_0.py +--- metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- 2019-12-01T00:00:00 True 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt index 82824f664e..6f1e747281 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_custom_grain_in_group_by +test_filename: test_fill_nulls_with_0.py +--- booking__ds__martian_day bookings_join_to_time_spine -------------------------- ----------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt index 81e67fd874..41f7225a3e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt index ce17a585db..d9496fabd6 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_0.py +--- booking__ds__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt index 81e67fd874..c7c2e46f6a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt index 376133d04d..a8724f2db2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day archived_users_join_to_time_spine ------------------- ----------------------------------- 2020-01-01T00:00:00 12 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ae8abac1e2..998ef403ed 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 ------------------- ---------------------------- 2019-11-25T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt index c63eb2656b..820aee54a1 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_0.py +--- metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- 2019-01-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt index 76b6578d5d..44474282b2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/DuckDB/test_simple_join_to_time_spine__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- 2019-11-27T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 10e1ce0068..34cc439e31 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- 2019-11-25T00:00:00 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index c59590b747..e53389bcbd 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension +test_filename: test_fill_nulls_with_0.py +--- metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- 2019-12-01T00:00:00 True 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt index 82824f664e..6f1e747281 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_custom_grain_in_group_by +test_filename: test_fill_nulls_with_0.py +--- booking__ds__martian_day bookings_join_to_time_spine -------------------------- ----------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt index 81e67fd874..41f7225a3e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt index ce17a585db..d9496fabd6 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_0.py +--- booking__ds__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt index 81e67fd874..c7c2e46f6a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt index 376133d04d..a8724f2db2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day archived_users_join_to_time_spine ------------------- ----------------------------------- 2020-01-01T00:00:00 12 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ae8abac1e2..998ef403ed 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 ------------------- ---------------------------- 2019-11-25T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt index c63eb2656b..820aee54a1 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_0.py +--- metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- 2019-01-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt index 76b6578d5d..44474282b2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Postgres/test_simple_join_to_time_spine__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- 2019-11-27T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 10e1ce0068..34cc439e31 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- 2019-11-25T00:00:00 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index c59590b747..e53389bcbd 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension +test_filename: test_fill_nulls_with_0.py +--- metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- 2019-12-01T00:00:00 True 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt index 82824f664e..6f1e747281 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_custom_grain_in_group_by +test_filename: test_fill_nulls_with_0.py +--- booking__ds__martian_day bookings_join_to_time_spine -------------------------- ----------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt index 81e67fd874..41f7225a3e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt index ce17a585db..d9496fabd6 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_0.py +--- booking__ds__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt index 81e67fd874..c7c2e46f6a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine_with_tiered_filters ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt index 376133d04d..a8724f2db2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_0.py +--- metric_time__day archived_users_join_to_time_spine ------------------- ----------------------------------- 2020-01-01T00:00:00 12 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ae8abac1e2..998ef403ed 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 ------------------- ---------------------------- 2019-11-25T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt index c63eb2656b..820aee54a1 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_0.py +--- metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- 2019-01-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt index 76b6578d5d..44474282b2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Redshift/test_simple_join_to_time_spine__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- 2019-11-27T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt index a21899c27d..244209f358 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query +test_filename: test_fill_nulls_with_0.py +--- METRIC_TIME__WEEK BOOKINGS_FILL_NULLS_WITH_0 VIEWS ------------------- ---------------------------- ------- 2019-11-25T00:00:00 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index 0215f88a57..5ef31001bd 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension +test_filename: test_fill_nulls_with_0.py +--- METRIC_TIME__DAY LISTING__IS_LUX_LATEST BOOKINGS_FILL_NULLS_WITH_0_WITHOUT_TIME_SPINE VIEWS ------------------- ------------------------ ----------------------------------------------- ------- 2019-12-01T00:00:00 True 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt index d746e8293f..17fd809eb6 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_custom_grain_in_group_by +test_filename: test_fill_nulls_with_0.py +--- BOOKING__DS__MARTIAN_DAY BOOKINGS_JOIN_TO_TIME_SPINE -------------------------- ----------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt index 15bdfc7d89..a661e6e908 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_0.py +--- METRIC_TIME__DAY BOOKINGS_JOIN_TO_TIME_SPINE_WITH_TIERED_FILTERS ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt index d996a8d19e..c9a243a5d6 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_0.py +--- BOOKING__DS__DAY BOOKINGS_JOIN_TO_TIME_SPINE_WITH_TIERED_FILTERS ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt index 15bdfc7d89..708c971a32 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_0.py +--- METRIC_TIME__DAY BOOKINGS_JOIN_TO_TIME_SPINE_WITH_TIERED_FILTERS ------------------- ------------------------------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt index 2b181f9ea5..1ac939e1ee 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_0.py +--- METRIC_TIME__DAY ARCHIVED_USERS_JOIN_TO_TIME_SPINE ------------------- ----------------------------------- 2020-01-01T00:00:00 12 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt index 222d8c7a8d..05dcfa413b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_0.py +--- METRIC_TIME__WEEK BOOKINGS_FILL_NULLS_WITH_0 ------------------- ---------------------------- 2019-11-25T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt index 524c6a02f6..08d81814f2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_0.py +--- METRIC_TIME__MONTH BOOKINGS_FILL_NULLS_WITH_0 -------------------- ---------------------------- 2019-01-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt index 7e8685a50b..824b9b744a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Snowflake/test_simple_join_to_time_spine__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_fill_nulls_with_0.py +--- METRIC_TIME__DAY BOOKINGS_JOIN_TO_TIME_SPINE ------------------- ----------------------------- 2019-11-27T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt index 10e1ce0068..34cc439e31 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 views ------------------- ---------------------------- ------- 2019-11-25T00:00:00 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt index c59590b747..e53389bcbd 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_fill_nulls_with_0_multi_metric_query_with_categorical_dimension +test_filename: test_fill_nulls_with_0.py +--- metric_time__day listing__is_lux_latest bookings_fill_nulls_with_0_without_time_spine views ------------------- ------------------------ ----------------------------------------------- ------- 2019-12-01T00:00:00 True 1 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt index 82824f664e..6f1e747281 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_join_to_time_spine_with_custom_grain_in_group_by__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_custom_grain_in_group_by +test_filename: test_fill_nulls_with_0.py +--- booking__ds__martian_day bookings_join_to_time_spine -------------------------- ----------------------------- 2020-01-01T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt index ae8abac1e2..998ef403ed 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_metric_time__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_0.py +--- metric_time__week bookings_fill_nulls_with_0 ------------------- ---------------------------- 2019-11-25T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt index c63eb2656b..820aee54a1 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_fill_nulls_with_0_month__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_0.py +--- metric_time__month bookings_fill_nulls_with_0 -------------------- ---------------------------- 2019-01-01T00:00:00 0 diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt index 76b6578d5d..44474282b2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt +++ b/tests_metricflow/snapshots/test_fill_nulls_with_0.py/str/Trino/test_simple_join_to_time_spine__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_fill_nulls_with_0.py +--- metric_time__day bookings_join_to_time_spine ------------------- ----------------------------- 2019-11-27T00:00:00 None diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_fill_nulls__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_fill_nulls__plan0.sql index 8de9be463c..528803ac83 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_fill_nulls__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_fill_nulls__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_fill_nulls__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_fill_nulls__plan0_optimized.sql index 9f1f38bb1e..91e90a624e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_fill_nulls__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_fill_nulls__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_derived_fill_nulls_for_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_derived_fill_nulls_for_one_input_metric__plan0.sql index 984a4b8ae0..26209f1d29 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_derived_fill_nulls_for_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_derived_fill_nulls_for_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql index 87d53fcbb9..2f3fd5cfdd 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 91f7def56a..935306dc8d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql index 6a61a5f0b0..dc5c355793 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index 68c2999a30..7576047502 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql index 1b12abe850..f12334dccb 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index 6c4db66318..910a25a88b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql index 215a1113d4..c2fd97c403 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index c1fe8ab7b8..59233fa9fc 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 7b1927e1b5..dd3f1f1351 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filters__plan0.sql index adf60f365b..644f181204 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filters__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filters__plan0_optimized.sql index e0c07ad935..47a8ef1df9 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_filters__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_metric_time__plan0.sql index 5812cc2483..ef9d67a613 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql index 9d4fa355d8..5f28fcf22e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0.sql index 2de3ded076..a909a747b3 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0_optimized.sql index ee423ff186..f3fb4e48aa 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_month__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql index 809a099a28..d815ceaa1f 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql index ca9a0d3470..af9628fe6e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql index 22aed5a4b8..b49dad1dad 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql index b760d99d5e..94e6f975a5 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_without_time_spine__plan0.sql index b9b21db2f2..7543361000 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql index 33c3777a3e..4dfd41cbf5 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/BigQuery/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_cumulative_fill_nulls__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_cumulative_fill_nulls__plan0.sql index b469ba34db..53f01f465a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_cumulative_fill_nulls__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_cumulative_fill_nulls__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_cumulative_fill_nulls__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_cumulative_fill_nulls__plan0_optimized.sql index d32d1947ec..7944254e53 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_cumulative_fill_nulls__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_cumulative_fill_nulls__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_derived_fill_nulls_for_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_derived_fill_nulls_for_one_input_metric__plan0.sql index 1f30074712..f8c04bb1f8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_derived_fill_nulls_for_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_derived_fill_nulls_for_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql index 7aebf57d13..ccc4a9a22c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index e4d11688cf..d557ecc5fb 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql index ede2d5b59a..b5fb654a30 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index 34169a6cdb..bd2fb70a14 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql index d57f45890a..369a0ab4d8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index 9649f6fe95..18abd4b898 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql index 1096450ee1..86888fbb06 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index 4c064814e2..d873e45a80 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 57d1af7281..c38bcc1ef2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filters__plan0.sql index 23f82cee04..bcd5354409 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filters__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filters__plan0_optimized.sql index 8caa1086da..c53a7868e2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_filters__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_metric_time__plan0.sql index 513af8589e..e2c91df522 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql index 591b4614fd..26419b399a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0.sql index 4ce6f95fd9..b63896769b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0_optimized.sql index aad33e7f07..58386963a7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_month__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql index 30c157c017..1cfee4a091 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql index ca9a0d3470..af9628fe6e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql index f83fcd852b..214c13af5b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql index bc2036b9bd..b41a89b1b8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_without_time_spine__plan0.sql index 34409de0ea..d61a2da56c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql index 3af90d64a2..3676eb34f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Databricks/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_fill_nulls__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_fill_nulls__plan0.sql index e30f09d486..b0d4319e44 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_fill_nulls__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_fill_nulls__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_fill_nulls__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_fill_nulls__plan0_optimized.sql index 80c8cdd0e9..b3e9d4f559 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_fill_nulls__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_fill_nulls__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_derived_fill_nulls_for_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_derived_fill_nulls_for_one_input_metric__plan0.sql index eb0612129b..31af9cb537 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_derived_fill_nulls_for_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_derived_fill_nulls_for_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql index 918daa9a18..f27fb8676b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 84912e54e1..e2c0b97a5c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql index ede2d5b59a..b5fb654a30 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index e9b1caba63..b36adbc96f 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql index d57f45890a..369a0ab4d8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index 58c0fb4a2a..c1c4769317 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql index 1096450ee1..86888fbb06 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index 454271efac..629e1ec299 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 57d1af7281..c38bcc1ef2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filters__plan0.sql index af69da9b75..356140afa8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filters__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filters__plan0_optimized.sql index 8caa1086da..c53a7868e2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_filters__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_metric_time__plan0.sql index bd106944b5..ec94c43c2b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql index 591b4614fd..26419b399a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_month__plan0.sql index 5c3b8e6f6c..bd5fbe0b03 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_month__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_month__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_month__plan0_optimized.sql index aad33e7f07..58386963a7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_month__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_month__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql index de0dc126a4..27c3df192d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql index ca9a0d3470..af9628fe6e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql index 5186364387..7058e4bcdb 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql index bc2036b9bd..b41a89b1b8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_without_time_spine__plan0.sql index 8d0af3eb4c..f614ca9fa2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql index 3af90d64a2..3676eb34f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/DuckDB/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_cumulative_fill_nulls__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_cumulative_fill_nulls__plan0.sql index f6c9632e5f..3534a97b8b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_cumulative_fill_nulls__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_cumulative_fill_nulls__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_cumulative_fill_nulls__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_cumulative_fill_nulls__plan0_optimized.sql index 0015e66542..cbcb9b8eeb 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_cumulative_fill_nulls__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_cumulative_fill_nulls__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_derived_fill_nulls_for_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_derived_fill_nulls_for_one_input_metric__plan0.sql index eab935741e..0845aba475 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_derived_fill_nulls_for_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_derived_fill_nulls_for_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql index 1466014ae4..960da05016 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 84912e54e1..e2c0b97a5c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql index ede2d5b59a..b5fb654a30 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index e9b1caba63..b36adbc96f 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql index d57f45890a..369a0ab4d8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index 58c0fb4a2a..c1c4769317 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql index 1096450ee1..86888fbb06 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index 454271efac..629e1ec299 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 57d1af7281..c38bcc1ef2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filters__plan0.sql index af69da9b75..356140afa8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filters__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filters__plan0_optimized.sql index 8caa1086da..c53a7868e2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_filters__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_metric_time__plan0.sql index bd106944b5..ec94c43c2b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql index 591b4614fd..26419b399a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0.sql index 5c3b8e6f6c..bd5fbe0b03 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0_optimized.sql index aad33e7f07..58386963a7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_month__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql index de0dc126a4..27c3df192d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql index ca9a0d3470..af9628fe6e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql index 5186364387..7058e4bcdb 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql index bc2036b9bd..b41a89b1b8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_without_time_spine__plan0.sql index 8d0af3eb4c..f614ca9fa2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql index 3af90d64a2..3676eb34f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Postgres/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_cumulative_fill_nulls__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_cumulative_fill_nulls__plan0.sql index 506eee1118..659cab22c7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_cumulative_fill_nulls__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_cumulative_fill_nulls__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_cumulative_fill_nulls__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_cumulative_fill_nulls__plan0_optimized.sql index d32d1947ec..7944254e53 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_cumulative_fill_nulls__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_cumulative_fill_nulls__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_derived_fill_nulls_for_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_derived_fill_nulls_for_one_input_metric__plan0.sql index 560ae7e845..5fabb9efe5 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_derived_fill_nulls_for_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_derived_fill_nulls_for_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql index 7aebf57d13..ccc4a9a22c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index ebaadd08b0..4ffa0ba161 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql index ede2d5b59a..b5fb654a30 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index bae7e0b487..e694d13652 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql index d57f45890a..369a0ab4d8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index bbdd0d9930..e761113122 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql index 1096450ee1..86888fbb06 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index b51298c86f..9aa5dc5c3b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 57d1af7281..c38bcc1ef2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filters__plan0.sql index e6052318bb..d289e66825 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filters__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filters__plan0_optimized.sql index 8caa1086da..c53a7868e2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_filters__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_metric_time__plan0.sql index 1d9cf76bfb..a9889e9986 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql index 591b4614fd..26419b399a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0.sql index cb386e7d26..5ff57ada27 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0_optimized.sql index aad33e7f07..58386963a7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_month__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql index 71407ebcca..5588df706c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql index ca9a0d3470..af9628fe6e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql index 517c87d774..abc34c9664 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql index bc2036b9bd..b41a89b1b8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_without_time_spine__plan0.sql index f0d8263b62..5ddb2c9c43 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql index 3af90d64a2..3676eb34f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Redshift/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_fill_nulls__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_fill_nulls__plan0.sql index c38b6b1ab5..369aa72b9e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_fill_nulls__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_fill_nulls__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_fill_nulls__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_fill_nulls__plan0_optimized.sql index d32d1947ec..7944254e53 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_fill_nulls__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_fill_nulls__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_derived_fill_nulls_for_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_derived_fill_nulls_for_one_input_metric__plan0.sql index 333d2eaaba..d0e544331d 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_derived_fill_nulls_for_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_derived_fill_nulls_for_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql index 7aebf57d13..ccc4a9a22c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 6ddf4121e0..e8678dd51b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql index ede2d5b59a..b5fb654a30 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index 3430ba3fbc..ca6f50821e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql index d57f45890a..369a0ab4d8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index 94d6603f93..ca7e1e1e9c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql index 1096450ee1..86888fbb06 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index 25ae31a561..96c0167f42 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 57d1af7281..c38bcc1ef2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filters__plan0.sql index f66d044522..41d0bc584f 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filters__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filters__plan0_optimized.sql index 8caa1086da..c53a7868e2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_filters__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_metric_time__plan0.sql index 1e6c628c7e..e4e7fea16c 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql index 591b4614fd..26419b399a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0.sql index 29e314f24f..0588ecce24 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0_optimized.sql index aad33e7f07..58386963a7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_month__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql index 8bf13b1dbb..f7eff316f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql index ca9a0d3470..af9628fe6e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql index 07475e134a..547a9b8dc1 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql index bc2036b9bd..b41a89b1b8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_without_time_spine__plan0.sql index d7ff90e1f6..7f2eb5528e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql index 3af90d64a2..3676eb34f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Snowflake/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_cumulative_fill_nulls__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_cumulative_fill_nulls__plan0.sql index 593f90d343..7ff0ce68cd 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_cumulative_fill_nulls__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_cumulative_fill_nulls__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_cumulative_fill_nulls__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_cumulative_fill_nulls__plan0_optimized.sql index 370a5e255e..1ee69a66c8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_cumulative_fill_nulls__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_cumulative_fill_nulls__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_cumulative_fill_nulls +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_derived_fill_nulls_for_one_input_metric__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_derived_fill_nulls_for_one_input_metric__plan0.sql index 1c645ecec6..9283a52edf 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_derived_fill_nulls_for_one_input_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_derived_fill_nulls_for_one_input_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_16.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql index d5ffd5e9bd..009942e369 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_derived_fill_nulls_for_one_input_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_derived_fill_nulls_for_one_input_metric +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql index 7007805b6d..8b70c31e13 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql index ede2d5b59a..b5fb654a30 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql index f6e5c9a28a..b565a17583 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.booking__ds__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql index d57f45890a..369a0ab4d8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql index a156c69349..7b7d32195f 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql index 1096450ee1..86888fbb06 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_not_in_group_by_using_agg_time_and_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql index a28d453417..0e0d4af117 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql index 57d1af7281..c38bcc1ef2 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filter_smaller_than_group_by__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filter_smaller_than_group_by +test_filename: test_fill_nulls_with_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filters__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filters__plan0.sql index 57e296fa0b..774303a4f5 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filters__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_10.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filters__plan0_optimized.sql index 09037ea1d9..8c7c568ecd 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_filters__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_join_to_time_spine_with_filters +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_metric_time__plan0.sql index 8071271763..5f7c3c5e45 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql index 591b4614fd..26419b399a 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_month__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_month__plan0.sql index bbefe5bc6f..efd2498e3b 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_month__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_month__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_month__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_month__plan0_optimized.sql index aad33e7f07..58386963a7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_month__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_month__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_month +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__month diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql index d4e877a97c..a5911484a4 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql index ca9a0d3470..af9628fe6e 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_categorical_dimension +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__is_instant diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql index e77e718d0d..8b76bc0a01 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_non_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql index bc2036b9bd..b41a89b1b8 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_with_0_with_non_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_with_0_with_non_metric_time +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT booking__paid_at__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_without_time_spine__plan0.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_without_time_spine__plan0.sql index e925a2996c..a55e035d11 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_without_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_without_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__day diff --git a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql index 3af90d64a2..3676eb34f7 100644 --- a/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_fill_nulls_with_rendering.py/SqlQueryPlan/Trino/test_simple_fill_nulls_without_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_fill_nulls_without_time_spine +test_filename: test_fill_nulls_with_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_date_part__plan0.sql index 5885d993cc..b7ff910ccc 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_date_part__plan0_optimized.sql index 109240c757..5799b380ea 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_offset_window_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql index c562a10d29..56e2ed616b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.listing__user__bio_added_ts__minute diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql index 258dac38ec..1b8c4625c2 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__bio_added_ts__minute'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_sub_daily_dimension__plan0.sql index e0ea1863ad..c8bc97a3e8 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.user__archived_at__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql index b48135ac21..bbd672333a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_date_part__plan0.sql index f5e982e99a..6a68f4f240 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_date_part__plan0_optimized.sql index d1653eb609..f971b278de 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_multiple_date_parts__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_multiple_date_parts__plan0.sql index 55ae076884..8dea37c871 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_multiple_date_parts__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_multiple_date_parts__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_year diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_multiple_date_parts__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_multiple_date_parts__plan0_optimized.sql index bf4a25e056..8cefe18c8b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_multiple_date_parts__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_simple_query_with_multiple_date_parts__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0.sql index d3e3e850f8..0bdb902c55 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0_optimized.sql index fdc7c955bd..00cf82046e 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Read Elements From Semantic Model 'users_ds_source' -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql index 2cd1404453..8ec068d548 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__millisecond',] SELECT subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql index 861d1aeed0..7561843f0a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_sub_daily_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0.sql index a9629ffe48..528c540f1c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql index c2c2880c4f..8c12f78fff 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0.sql index 837b1fb254..8f74894330 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0_optimized.sql index d5b1b0bc66..eb12e75f6d 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_cumulative_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql index 371083d74c..1e5d7aa992 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql index 97859a3220..cd562d877e 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0.sql index 371083d74c..e5f41b9879 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql index 97859a3220..3858956921 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0.sql index 2dc17f03a4..8df49cb6a0 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0_optimized.sql index 82f176cfbe..45dbc79ddf 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_to_grain_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0.sql index f25cd83b4a..6be2ba1b1c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0_optimized.sql index ee3ca01a8b..7d3ed4f6eb 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_offset_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0.sql index 0bf53c189c..f51adba96c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0_optimized.sql index 527431e202..30648c81d6 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_with_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0.sql index aca3a7f634..a7e187be9c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__second',] SELECT subq_2.metric_time__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index faf5828392..700a5d9699 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/BigQuery/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_date_part__plan0.sql index 2320e8b134..f999e809b9 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_date_part__plan0_optimized.sql index 7ce159c55f..ed7ec0cd07 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_offset_window_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql index 6372447730..73ab4742c8 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.listing__user__bio_added_ts__minute diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql index 43eaac5acd..8ea2afaa45 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__bio_added_ts__minute'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_sub_daily_dimension__plan0.sql index 6957307244..9f10f02b63 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.user__archived_at__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql index c20146c881..0f3335a2c1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_date_part__plan0.sql index 7a25b7bb4c..cc3ac79ba3 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_date_part__plan0_optimized.sql index 3ef580c643..7eb773af7a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_multiple_date_parts__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_multiple_date_parts__plan0.sql index 3dda19bcac..9e84a54bd7 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_multiple_date_parts__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_multiple_date_parts__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_year diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_multiple_date_parts__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_multiple_date_parts__plan0_optimized.sql index 0edad00436..3ae1a7211c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_multiple_date_parts__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_simple_query_with_multiple_date_parts__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0.sql index 85f046d53e..548800745f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0_optimized.sql index b7bf7d7395..c132b691a7 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Read Elements From Semantic Model 'users_ds_source' -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql index a913e4dc26..5cf25d5ed4 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__millisecond',] SELECT subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql index 6bc0e3fe94..7ed0e04099 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_sub_daily_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0.sql index 79da25522b..56c141df9a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql index fe834fa9e6..7ff7e68349 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_window_metric__plan0.sql index bf8eb1e375..02d8ff301f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_window_metric__plan0_optimized.sql index 383af54854..fcf26f2e6b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_cumulative_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql index 7968c03d70..2414c2a35f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql index 44763c6b6e..ada31ddc92 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_join_to_time_spine_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_join_to_time_spine_metric__plan0.sql index 7968c03d70..c9c8abb0f6 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_join_to_time_spine_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_join_to_time_spine_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql index 44763c6b6e..6d1d918e4a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_to_grain_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_to_grain_metric__plan0.sql index 656b76a7f9..e72e235280 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_to_grain_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_to_grain_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_to_grain_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_to_grain_metric__plan0_optimized.sql index 2679104380..195dfae1b0 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_to_grain_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_to_grain_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_window_metric__plan0.sql index 7f24f79da5..b589d0aaf8 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_window_metric__plan0_optimized.sql index c1f150dd0c..5a102fe241 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_offset_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0.sql index 5e2ec2cb9c..0fe934fb02 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0_optimized.sql index 7fef407456..403b8b1baf 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_with_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0.sql index 5d27593574..b70096eb20 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__second',] SELECT subq_2.metric_time__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index da3180d776..7fb8cacb9c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Databricks/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_date_part__plan0.sql index a0db6aa138..a189cfb874 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_date_part__plan0_optimized.sql index 9ab2ad55e6..ab6ae3d30f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_offset_window_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql index a09d45dae9..1ebf8886ad 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.listing__user__bio_added_ts__minute diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql index 43eaac5acd..8ea2afaa45 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__bio_added_ts__minute'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_sub_daily_dimension__plan0.sql index e1d3b4b02c..0a8672b517 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.user__archived_at__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql index c20146c881..0f3335a2c1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_date_part__plan0.sql index c8bfaf1393..a36c505db5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_date_part__plan0_optimized.sql index 6f941d2507..df79b4580a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_multiple_date_parts__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_multiple_date_parts__plan0.sql index dce9e5edd0..4baf5c4cf5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_multiple_date_parts__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_multiple_date_parts__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_year diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_multiple_date_parts__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_multiple_date_parts__plan0_optimized.sql index f99f93118d..32be92b6d2 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_multiple_date_parts__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_simple_query_with_multiple_date_parts__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0.sql index e10224debe..9ff61f6f51 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0_optimized.sql index b7bf7d7395..c132b691a7 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Read Elements From Semantic Model 'users_ds_source' -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0.sql index 4507843952..337837b006 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__millisecond',] SELECT subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0_optimized.sql index 6bc0e3fe94..7ed0e04099 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_sub_daily_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_grain_to_date_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_grain_to_date_metric__plan0.sql index 1a252f2ebe..b4445c076e 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_grain_to_date_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_grain_to_date_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql index fe834fa9e6..7ff7e68349 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_window_metric__plan0.sql index a18b954931..2bcb33e14f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_window_metric__plan0_optimized.sql index f031751858..8706d50261 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_cumulative_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql index fe488e80ff..3e08dc04ba 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql index 44763c6b6e..ada31ddc92 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_join_to_time_spine_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_join_to_time_spine_metric__plan0.sql index fe488e80ff..5a4481aa94 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_join_to_time_spine_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_join_to_time_spine_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql index 44763c6b6e..6d1d918e4a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_to_grain_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_to_grain_metric__plan0.sql index d30be670b4..5f4fd4758c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_to_grain_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_to_grain_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_to_grain_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_to_grain_metric__plan0_optimized.sql index 2679104380..195dfae1b0 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_to_grain_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_to_grain_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_window_metric__plan0.sql index 9a1d976fcd..c3ad9f6a25 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_window_metric__plan0_optimized.sql index 66fbdfb392..f1d8b89084 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_offset_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_with_metric__plan0.sql index f1543cd157..316205ab84 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_with_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_with_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_with_metric__plan0_optimized.sql index 7fef407456..403b8b1baf 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_with_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_with_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_without_metrics__plan0.sql index 43dbe48625..18b45c88a5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__second',] SELECT subq_2.metric_time__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index da3180d776..7fb8cacb9c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/DuckDB/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_date_part__plan0.sql index 7229cf2062..142784ff66 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_date_part__plan0_optimized.sql index f231ddabfd..aa2cf9a06a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_offset_window_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql index a09d45dae9..1ebf8886ad 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.listing__user__bio_added_ts__minute diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql index 43eaac5acd..8ea2afaa45 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__bio_added_ts__minute'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_sub_daily_dimension__plan0.sql index e1d3b4b02c..0a8672b517 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.user__archived_at__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql index c20146c881..0f3335a2c1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_date_part__plan0.sql index c8bfaf1393..a36c505db5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_date_part__plan0_optimized.sql index 6f941d2507..df79b4580a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_multiple_date_parts__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_multiple_date_parts__plan0.sql index dce9e5edd0..4baf5c4cf5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_multiple_date_parts__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_multiple_date_parts__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_year diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_multiple_date_parts__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_multiple_date_parts__plan0_optimized.sql index f99f93118d..32be92b6d2 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_multiple_date_parts__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_simple_query_with_multiple_date_parts__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0.sql index e10224debe..9ff61f6f51 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0_optimized.sql index b7bf7d7395..c132b691a7 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Read Elements From Semantic Model 'users_ds_source' -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql index 4507843952..337837b006 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__millisecond',] SELECT subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql index 6bc0e3fe94..7ed0e04099 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_sub_daily_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_grain_to_date_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_grain_to_date_metric__plan0.sql index 1a252f2ebe..b4445c076e 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_grain_to_date_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_grain_to_date_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql index fe834fa9e6..7ff7e68349 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_window_metric__plan0.sql index c4cdff003c..0f2aa97c7b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_window_metric__plan0_optimized.sql index 86828264bb..7c8099f397 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_cumulative_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql index fe488e80ff..3e08dc04ba 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql index 44763c6b6e..ada31ddc92 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_join_to_time_spine_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_join_to_time_spine_metric__plan0.sql index fe488e80ff..5a4481aa94 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_join_to_time_spine_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_join_to_time_spine_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql index 44763c6b6e..6d1d918e4a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_to_grain_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_to_grain_metric__plan0.sql index d30be670b4..5f4fd4758c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_to_grain_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_to_grain_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_to_grain_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_to_grain_metric__plan0_optimized.sql index 2679104380..195dfae1b0 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_to_grain_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_to_grain_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_window_metric__plan0.sql index 86e2ae8260..1d78f468bd 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_window_metric__plan0_optimized.sql index 4481a4f63b..6688d29552 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_offset_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0.sql index f1543cd157..316205ab84 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0_optimized.sql index 7fef407456..403b8b1baf 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_with_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0.sql index 43dbe48625..18b45c88a5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__second',] SELECT subq_2.metric_time__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index da3180d776..7fb8cacb9c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Postgres/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_date_part__plan0.sql index a6a4c2d5f9..43745b7018 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_date_part__plan0_optimized.sql index 4829b102ed..4a9fa6647b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_offset_window_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql index 44899f5519..609c737b6c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.listing__user__bio_added_ts__minute diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql index 43eaac5acd..8ea2afaa45 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__bio_added_ts__minute'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_sub_daily_dimension__plan0.sql index efda16c776..74f4f7a845 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.user__archived_at__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql index c20146c881..0f3335a2c1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_date_part__plan0.sql index 8f59530617..8e0022ad4e 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_date_part__plan0_optimized.sql index 8724f99175..372afd9a43 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_multiple_date_parts__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_multiple_date_parts__plan0.sql index 58feb145ca..dd0e872b78 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_multiple_date_parts__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_multiple_date_parts__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_year diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_multiple_date_parts__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_multiple_date_parts__plan0_optimized.sql index 608dc50ec6..6803409d5f 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_multiple_date_parts__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_simple_query_with_multiple_date_parts__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0.sql index 02932acf3f..1f53b95a08 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0_optimized.sql index b7bf7d7395..c132b691a7 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Read Elements From Semantic Model 'users_ds_source' -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql index 6747428a95..48c4c8f831 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__millisecond',] SELECT subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql index 6bc0e3fe94..7ed0e04099 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_sub_daily_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_grain_to_date_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_grain_to_date_metric__plan0.sql index 4ef0598915..6d018c8619 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_grain_to_date_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_grain_to_date_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql index fe834fa9e6..7ff7e68349 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_window_metric__plan0.sql index 1d47d605da..de82f41bdf 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_window_metric__plan0_optimized.sql index 383af54854..fcf26f2e6b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_cumulative_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql index b20cb0d168..d1397142dd 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql index 44763c6b6e..ada31ddc92 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_join_to_time_spine_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_join_to_time_spine_metric__plan0.sql index b20cb0d168..f39f9ea420 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_join_to_time_spine_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_join_to_time_spine_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql index 44763c6b6e..6d1d918e4a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_to_grain_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_to_grain_metric__plan0.sql index 3cbe377614..6b7bace614 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_to_grain_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_to_grain_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_to_grain_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_to_grain_metric__plan0_optimized.sql index 2679104380..195dfae1b0 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_to_grain_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_to_grain_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_window_metric__plan0.sql index 06128e25e6..6a6ea775fe 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_window_metric__plan0_optimized.sql index c1f150dd0c..5a102fe241 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_offset_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0.sql index de5289af50..ebbf4c72a1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0_optimized.sql index 7fef407456..403b8b1baf 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_with_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0.sql index 2e7e403841..0ec3aaa8de 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__second',] SELECT subq_2.metric_time__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index da3180d776..7fb8cacb9c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Redshift/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_date_part__plan0.sql index 9ebe5b940a..1009567e62 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_date_part__plan0_optimized.sql index d181746878..1e30b366b1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_offset_window_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql index 2f96e1b355..d86e7fc2fd 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.listing__user__bio_added_ts__minute diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql index 43eaac5acd..8ea2afaa45 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__bio_added_ts__minute'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_sub_daily_dimension__plan0.sql index e86f504fd3..63f42b6cde 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.user__archived_at__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql index c20146c881..0f3335a2c1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_date_part__plan0.sql index 9f7b689f7f..243337a112 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_date_part__plan0_optimized.sql index 4360bf6010..7190e17bc5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_multiple_date_parts__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_multiple_date_parts__plan0.sql index fae327ceda..e6181ae644 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_multiple_date_parts__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_multiple_date_parts__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_year diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_multiple_date_parts__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_multiple_date_parts__plan0_optimized.sql index 58ec0b7d64..8b2b458dea 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_multiple_date_parts__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_simple_query_with_multiple_date_parts__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0.sql index 0c6511a2c8..05331aa8c5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0_optimized.sql index b7bf7d7395..c132b691a7 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Read Elements From Semantic Model 'users_ds_source' -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql index 7a8fe48698..30d20438ba 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__millisecond',] SELECT subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql index 6bc0e3fe94..7ed0e04099 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_sub_daily_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_grain_to_date_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_grain_to_date_metric__plan0.sql index 23c7ebf08d..892cb391d8 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_grain_to_date_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_grain_to_date_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql index fe834fa9e6..7ff7e68349 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_window_metric__plan0.sql index 3f7f85a176..e639429bd3 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_window_metric__plan0_optimized.sql index 383af54854..fcf26f2e6b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_cumulative_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql index 1da20491ef..2d24e2db3b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql index 44763c6b6e..ada31ddc92 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_join_to_time_spine_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_join_to_time_spine_metric__plan0.sql index 1da20491ef..880bd7f1b8 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_join_to_time_spine_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_join_to_time_spine_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql index 44763c6b6e..6d1d918e4a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_to_grain_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_to_grain_metric__plan0.sql index b127b9b063..c17d01e7ba 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_to_grain_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_to_grain_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_to_grain_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_to_grain_metric__plan0_optimized.sql index 2679104380..195dfae1b0 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_to_grain_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_to_grain_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_window_metric__plan0.sql index af61bc2907..e48b84ad83 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_window_metric__plan0_optimized.sql index c1f150dd0c..5a102fe241 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_offset_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0.sql index 2b3ee9b379..686dd5150b 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0_optimized.sql index 7fef407456..403b8b1baf 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_with_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0.sql index a94457e93f..f71526724d 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__second',] SELECT subq_2.metric_time__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index da3180d776..7fb8cacb9c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Snowflake/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_date_part__plan0.sql index eacfae4235..ebbec07611 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_13.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_date_part__plan0_optimized.sql index 7cf9240bf9..8488540970 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_offset_window_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_offset_window_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql index 3ba5278295..4019928129 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_joined_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.listing__user__bio_added_ts__minute diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql index 43eaac5acd..8ea2afaa45 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_joined_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_joined_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__bio_added_ts__minute'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_sub_daily_dimension__plan0.sql index eeba1c67bf..54ebac47f5 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.user__archived_at__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql index c20146c881..0f3335a2c1 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_metric_with_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_metric_with_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_date_part__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_date_part__plan0.sql index 52a7d6fbc3..abac6ae291 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_date_part__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_date_part__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_dow diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_date_part__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_date_part__plan0_optimized.sql index 9c2ebad9ea..1f9a8df9fc 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_date_part__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_date_part__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_date_part +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_multiple_date_parts__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_multiple_date_parts__plan0.sql index 362a8fb2f9..77bd5d3812 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_multiple_date_parts__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_multiple_date_parts__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.metric_time__extract_year diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_multiple_date_parts__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_multiple_date_parts__plan0_optimized.sql index 266080504e..0ddec86c84 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_multiple_date_parts__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_simple_query_with_multiple_date_parts__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_query_with_multiple_date_parts +test_filename: test_granularity_date_part_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0.sql index 493add2b99..3ec47dc6da 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT subq_0.user__bio_added_ts__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0_optimized.sql index b7bf7d7395..c132b691a7 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_dimension__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_dimension +test_filename: test_granularity_date_part_rendering.py +--- -- Read Elements From Semantic Model 'users_ds_source' -- Pass Only Elements: ['user__bio_added_ts__second',] SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql index 58d3c2359f..e071b78658 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__millisecond',] SELECT subq_1.metric_time__millisecond diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql index 6bc0e3fe94..7ed0e04099 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_sub_daily_metric_time__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_sub_daily_metric_time +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Pass Only Elements: ['metric_time__millisecond',] diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_grain_to_date_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_grain_to_date_metric__plan0.sql index b1e2e5d581..b5e086af4e 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_grain_to_date_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_grain_to_date_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql index fe834fa9e6..7ff7e68349 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_grain_to_date_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_grain_to_date_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_window_metric__plan0.sql index 56dd014810..4280922c2d 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_window_metric__plan0_optimized.sql index 38bf90d047..7f2bf33c46 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_cumulative_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_cumulative_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join Self Over Time Range -- Pass Only Elements: ['archived_users', 'metric_time__hour'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql index 8d782a8799..c72b50d432 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_granularity_overrides_metric_default_granularity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql index 44763c6b6e..ada31ddc92 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_granularity_overrides_metric_default_granularity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_granularity_overrides_metric_default_granularity +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_join_to_time_spine_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_join_to_time_spine_metric__plan0.sql index 8d782a8799..7b60ff9ef4 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_join_to_time_spine_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_join_to_time_spine_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql index 44763c6b6e..6d1d918e4a 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_join_to_time_spine_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_join_to_time_spine_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_to_grain_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_to_grain_metric__plan0.sql index 3f01692015..f509fbc2b0 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_to_grain_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_to_grain_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_to_grain_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_to_grain_metric__plan0_optimized.sql index 2679104380..195dfae1b0 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_to_grain_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_to_grain_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_to_grain_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_window_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_window_metric__plan0.sql index cbf1be1e9d..061aab9148 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_window_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_window_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_window_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_window_metric__plan0_optimized.sql index 70b55ba01d..e1006a479c 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_window_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_offset_window_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_offset_window_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_with_metric__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_with_metric__plan0.sql index 8a6984d97e..36f535e738 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_with_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_with_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__hour diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_with_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_with_metric__plan0_optimized.sql index 62103ce318..1ea2550879 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_with_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_with_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_with_metric +test_filename: test_granularity_date_part_rendering.py +--- -- Join to Time Spine Dataset -- Constrain Time Range to [2020-01-01T02:00:00, 2020-01-01T05:00:00] -- Compute Metrics via Expressions diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0.sql index c21e9ace13..adb6dfc9af 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Pass Only Elements: ['metric_time__second',] SELECT subq_2.metric_time__second diff --git a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql index 250366421a..6ee6c515ca 100644 --- a/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_granularity_date_part_rendering.py/SqlQueryPlan/Trino/test_subdaily_time_constraint_without_metrics__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_subdaily_time_constraint_without_metrics +test_filename: test_granularity_date_part_rendering.py +--- -- Time Spine -- Metric Time Dimension 'ts' -- Constrain Time Range to [2020-01-01T00:00:02, 2020-01-01T00:00:08] diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_metric_with_metric_in_where_filter__query_output.txt index 3d93de3d16..bf6cc2998a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing active_listings bookings ------------------- ----------------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_query_with_simple_metric_in_where_filter__query_output.txt index f98e407d50..1b81e822b3 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/BigQuery/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing listings bookings --------- ---------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_metric_with_metric_in_where_filter__query_output.txt index 3d93de3d16..bf6cc2998a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing active_listings bookings ------------------- ----------------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_query_with_simple_metric_in_where_filter__query_output.txt index f98e407d50..1b81e822b3 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Databricks/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing listings bookings --------- ---------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_metric_with_metric_in_where_filter__query_output.txt index 3d93de3d16..bf6cc2998a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing active_listings bookings ------------------- ----------------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_query_with_simple_metric_in_where_filter__query_output.txt index f98e407d50..1b81e822b3 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/DuckDB/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing listings bookings --------- ---------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_metric_with_metric_in_where_filter__query_output.txt index 3d93de3d16..bf6cc2998a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing active_listings bookings ------------------- ----------------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_query_with_simple_metric_in_where_filter__query_output.txt index f98e407d50..1b81e822b3 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Postgres/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing listings bookings --------- ---------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_metric_with_metric_in_where_filter__query_output.txt index 3d93de3d16..bf6cc2998a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing active_listings bookings ------------------- ----------------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_query_with_simple_metric_in_where_filter__query_output.txt index f98e407d50..1b81e822b3 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Redshift/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing listings bookings --------- ---------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_metric_with_metric_in_where_filter__query_output.txt index 20a017f46b..dab3840c00 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- LISTING ACTIVE_LISTINGS BOOKINGS ------------------- ----------------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_query_with_simple_metric_in_where_filter__query_output.txt index f37096d8e8..f95d93577c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Snowflake/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- LISTING LISTINGS BOOKINGS --------- ---------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_metric_with_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_metric_with_metric_in_where_filter__query_output.txt index 3d93de3d16..bf6cc2998a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_metric_with_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_metric_with_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing active_listings bookings ------------------- ----------------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_query_with_simple_metric_in_where_filter__query_output.txt b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_query_with_simple_metric_in_where_filter__query_output.txt index f98e407d50..1b81e822b3 100644 --- a/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_query_with_simple_metric_in_where_filter__query_output.txt +++ b/tests_metricflow/snapshots/test_metric_filter_output.py/str/Trino/test_query_with_simple_metric_in_where_filter__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_output.py +--- listing listings bookings --------- ---------- ---------- l2718281 1 15 diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values_query_with_metric_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values_query_with_metric_filter__plan0.sql index 5fca49a30c..c7e86f2da1 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values_query_with_metric_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values_query_with_metric_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Pass Only Elements: ['listing',] SELECT subq_8.listing diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values_query_with_metric_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values_query_with_metric_filter__plan0_optimized.sql index c51da11fab..5fb0a03256 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values_query_with_metric_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values_query_with_metric_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing',] SELECT diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql index 3217f83f85..047e508ef2 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql index c954dc18c8..85799c722c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_conversion_metric__plan0.sql index c6f2147023..0fc7867e41 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_conversion_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_conversion_metric__plan0_optimized.sql index 1508b54428..46e8e21371 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_conversion_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_group_by_has_local_entity_prefix__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_group_by_has_local_entity_prefix__plan0.sql index 5bfad36ee4..ea8d658e36 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_group_by_has_local_entity_prefix__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_group_by_has_local_entity_prefix__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_group_by_has_local_entity_prefix__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_group_by_has_local_entity_prefix__plan0_optimized.sql index 1eaa9b7aba..9254787f3c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_group_by_has_local_entity_prefix__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_group_by_has_local_entity_prefix__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_multi_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_multi_hop__plan0.sql index c38766278a..476f4c662d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_multi_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_multi_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_19.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_multi_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_multi_hop__plan0_optimized.sql index db737b1986..0ca6005040 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_multi_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_multi_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_single_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_single_hop__plan0.sql index 1ed2f0023d..f4aeac698d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_single_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_single_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_12.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_single_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_single_hop__plan0_optimized.sql index d1a69b0cca..b770931cdc 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_single_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_inner_query_single_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0.sql index 2f6c9a13a5..ab11099441 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0_optimized.sql index 952462a601..30927f92e1 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_filtered_by_itself__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_metric_in_where_filter__plan0.sql index 5d2a06d7b5..e646cda3b7 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_metric_in_where_filter__plan0_optimized.sql index c2022ffbfc..a559e3e7c0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_cumulative_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_cumulative_metric_in_where_filter__plan0.sql index b48103ee38..715fe5ce75 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_cumulative_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_cumulative_metric_in_where_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql index cb8bf327ce..9771a00225 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_derived_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_derived_metric_in_where_filter__plan0.sql index f2200a151d..18171fb71a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_derived_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_derived_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql index 825dfd04b5..d3989b1304 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_multiple_metrics_in_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_multiple_metrics_in_filter__plan0.sql index e098fec181..be4fdf15fb 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_multiple_metrics_in_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_multiple_metrics_in_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_17.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql index 9824108ee4..605eeabf03 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_ratio_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_ratio_metric_in_where_filter__plan0.sql index d9d836e846..b1ce3e38e6 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_ratio_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_ratio_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql index 6fe17f2270..d42815e40a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_simple_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_simple_metric_in_where_filter__plan0.sql index cda4b8ec8e..71a9402547 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_simple_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_simple_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql index e163c214d3..7a35ec5149 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/BigQuery/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_distinct_values_query_with_metric_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_distinct_values_query_with_metric_filter__plan0.sql index 6efb1cdee0..152beb833c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_distinct_values_query_with_metric_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_distinct_values_query_with_metric_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Pass Only Elements: ['listing',] SELECT subq_8.listing diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_distinct_values_query_with_metric_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_distinct_values_query_with_metric_filter__plan0_optimized.sql index c51da11fab..5fb0a03256 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_distinct_values_query_with_metric_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_distinct_values_query_with_metric_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing',] SELECT diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql index 79f27ebdf3..24485d226b 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql index 4b33a96ff2..c58aa1a132 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_with_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_with_conversion_metric__plan0.sql index b1e6d59930..f76a205a4a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_with_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_with_conversion_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_with_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_with_conversion_metric__plan0_optimized.sql index 7981369c33..4171f3b1f7 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_with_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_filter_with_conversion_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_group_by_has_local_entity_prefix__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_group_by_has_local_entity_prefix__plan0.sql index abace8568d..628e1cf325 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_group_by_has_local_entity_prefix__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_group_by_has_local_entity_prefix__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_group_by_has_local_entity_prefix__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_group_by_has_local_entity_prefix__plan0_optimized.sql index 2ee174977a..0e8de0b2c0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_group_by_has_local_entity_prefix__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_group_by_has_local_entity_prefix__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_multi_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_multi_hop__plan0.sql index 26e6866fd3..f00ca84a54 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_multi_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_multi_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_19.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_multi_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_multi_hop__plan0_optimized.sql index bdcc03a79c..db440e96e5 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_multi_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_multi_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_single_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_single_hop__plan0.sql index 8c8be5f063..7003aab5aa 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_single_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_single_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_12.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_single_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_single_hop__plan0_optimized.sql index d1a69b0cca..b770931cdc 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_single_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_inner_query_single_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0.sql index 24f32dc58b..ac55db6ea8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0_optimized.sql index 2670479341..3eca4e552c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_filtered_by_itself__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_with_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_with_metric_in_where_filter__plan0.sql index 4c630ac86c..c06cf99fdd 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_with_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_with_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_with_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_with_metric_in_where_filter__plan0_optimized.sql index 6099c2233b..65b1f2a92d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_with_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_metric_with_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_cumulative_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_cumulative_metric_in_where_filter__plan0.sql index 3e578af81e..7bf2143853 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_cumulative_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_cumulative_metric_in_where_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql index aedda5822a..a124d15bc8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_derived_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_derived_metric_in_where_filter__plan0.sql index 1ee42c6070..86b4397f8b 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_derived_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_derived_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql index 7bb1c0f3a7..0cc3906e8e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_multiple_metrics_in_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_multiple_metrics_in_filter__plan0.sql index c65ee051a0..bb784445ca 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_multiple_metrics_in_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_multiple_metrics_in_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_17.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql index 0a8508c1ae..7e2d36fc5c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_ratio_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_ratio_metric_in_where_filter__plan0.sql index aa9ad9d38b..a4bff6666b 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_ratio_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_ratio_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql index c013b4d97f..e026c15bd8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_simple_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_simple_metric_in_where_filter__plan0.sql index 7271c1d83c..ffe38d9311 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_simple_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_simple_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql index e163c214d3..7a35ec5149 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Databricks/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values_query_with_metric_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values_query_with_metric_filter__plan0.sql index d89cbe19cb..e4ca567c15 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values_query_with_metric_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values_query_with_metric_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Pass Only Elements: ['listing',] SELECT subq_8.listing diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values_query_with_metric_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values_query_with_metric_filter__plan0_optimized.sql index c51da11fab..5fb0a03256 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values_query_with_metric_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values_query_with_metric_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing',] SELECT diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql index 971a1f3425..25215763d0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql index 4b33a96ff2..c58aa1a132 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_conversion_metric__plan0.sql index 26829eee6c..09190fd5ab 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_conversion_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_conversion_metric__plan0_optimized.sql index c282879028..3b98e0d834 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_conversion_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_group_by_has_local_entity_prefix__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_group_by_has_local_entity_prefix__plan0.sql index d98a7df7cc..80f1995d39 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_group_by_has_local_entity_prefix__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_group_by_has_local_entity_prefix__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_group_by_has_local_entity_prefix__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_group_by_has_local_entity_prefix__plan0_optimized.sql index 2ee174977a..0e8de0b2c0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_group_by_has_local_entity_prefix__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_group_by_has_local_entity_prefix__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_multi_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_multi_hop__plan0.sql index 6fb6f7252d..e0dfeecb59 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_multi_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_multi_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_19.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_multi_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_multi_hop__plan0_optimized.sql index bdcc03a79c..db440e96e5 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_multi_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_multi_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_single_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_single_hop__plan0.sql index 9fb74c6e09..55c5eea31c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_single_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_single_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_12.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_single_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_single_hop__plan0_optimized.sql index d1a69b0cca..b770931cdc 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_single_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_inner_query_single_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_filtered_by_itself__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_filtered_by_itself__plan0.sql index 1e4b7dfdf1..a12b4f9a7e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_filtered_by_itself__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_filtered_by_itself__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_filtered_by_itself__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_filtered_by_itself__plan0_optimized.sql index 2670479341..3eca4e552c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_filtered_by_itself__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_filtered_by_itself__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_metric_in_where_filter__plan0.sql index 0eba535244..3f6343da67 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_metric_in_where_filter__plan0_optimized.sql index 6099c2233b..65b1f2a92d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_cumulative_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_cumulative_metric_in_where_filter__plan0.sql index 41694f0f94..2a95758574 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_cumulative_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_cumulative_metric_in_where_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql index aedda5822a..a124d15bc8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_derived_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_derived_metric_in_where_filter__plan0.sql index 89746caea3..7ebb0c433a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_derived_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_derived_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql index 7bb1c0f3a7..0cc3906e8e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_multiple_metrics_in_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_multiple_metrics_in_filter__plan0.sql index da7fdf2ca5..f2ae1c7702 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_multiple_metrics_in_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_multiple_metrics_in_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_17.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql index 0a8508c1ae..7e2d36fc5c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_ratio_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_ratio_metric_in_where_filter__plan0.sql index 22d1e0885f..ad67caad16 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_ratio_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_ratio_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql index c013b4d97f..e026c15bd8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_simple_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_simple_metric_in_where_filter__plan0.sql index e930bc30c5..ff2255d7c7 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_simple_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_simple_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql index e163c214d3..7a35ec5149 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/DuckDB/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_distinct_values_query_with_metric_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_distinct_values_query_with_metric_filter__plan0.sql index d89cbe19cb..e4ca567c15 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_distinct_values_query_with_metric_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_distinct_values_query_with_metric_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Pass Only Elements: ['listing',] SELECT subq_8.listing diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_distinct_values_query_with_metric_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_distinct_values_query_with_metric_filter__plan0_optimized.sql index c51da11fab..5fb0a03256 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_distinct_values_query_with_metric_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_distinct_values_query_with_metric_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing',] SELECT diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql index 971a1f3425..25215763d0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql index 4b33a96ff2..c58aa1a132 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_with_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_with_conversion_metric__plan0.sql index 009f4efd73..1020d052a3 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_with_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_with_conversion_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_with_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_with_conversion_metric__plan0_optimized.sql index fd62594e7a..51cf267267 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_with_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_filter_with_conversion_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_group_by_has_local_entity_prefix__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_group_by_has_local_entity_prefix__plan0.sql index d98a7df7cc..80f1995d39 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_group_by_has_local_entity_prefix__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_group_by_has_local_entity_prefix__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_group_by_has_local_entity_prefix__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_group_by_has_local_entity_prefix__plan0_optimized.sql index 2ee174977a..0e8de0b2c0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_group_by_has_local_entity_prefix__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_group_by_has_local_entity_prefix__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_multi_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_multi_hop__plan0.sql index 6fb6f7252d..e0dfeecb59 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_multi_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_multi_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_19.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_multi_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_multi_hop__plan0_optimized.sql index bdcc03a79c..db440e96e5 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_multi_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_multi_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_single_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_single_hop__plan0.sql index 9fb74c6e09..55c5eea31c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_single_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_single_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_12.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_single_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_single_hop__plan0_optimized.sql index d1a69b0cca..b770931cdc 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_single_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_inner_query_single_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_filtered_by_itself__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_filtered_by_itself__plan0.sql index 1e4b7dfdf1..a12b4f9a7e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_filtered_by_itself__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_filtered_by_itself__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_filtered_by_itself__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_filtered_by_itself__plan0_optimized.sql index 2670479341..3eca4e552c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_filtered_by_itself__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_filtered_by_itself__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_with_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_with_metric_in_where_filter__plan0.sql index 0eba535244..3f6343da67 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_with_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_with_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_with_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_with_metric_in_where_filter__plan0_optimized.sql index 6099c2233b..65b1f2a92d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_with_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_metric_with_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_cumulative_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_cumulative_metric_in_where_filter__plan0.sql index 41694f0f94..2a95758574 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_cumulative_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_cumulative_metric_in_where_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql index aedda5822a..a124d15bc8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_derived_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_derived_metric_in_where_filter__plan0.sql index 89746caea3..7ebb0c433a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_derived_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_derived_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql index 7bb1c0f3a7..0cc3906e8e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_multiple_metrics_in_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_multiple_metrics_in_filter__plan0.sql index da7fdf2ca5..f2ae1c7702 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_multiple_metrics_in_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_multiple_metrics_in_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_17.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql index 0a8508c1ae..7e2d36fc5c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_ratio_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_ratio_metric_in_where_filter__plan0.sql index 3c87ca82b5..6b8490d302 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_ratio_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_ratio_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql index 8ff640f011..792f24c602 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_simple_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_simple_metric_in_where_filter__plan0.sql index e930bc30c5..ff2255d7c7 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_simple_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_simple_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql index e163c214d3..7a35ec5149 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Postgres/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_distinct_values_query_with_metric_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_distinct_values_query_with_metric_filter__plan0.sql index 30a4555b9e..4bdf44fbf9 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_distinct_values_query_with_metric_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_distinct_values_query_with_metric_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Pass Only Elements: ['listing',] SELECT subq_8.listing diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_distinct_values_query_with_metric_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_distinct_values_query_with_metric_filter__plan0_optimized.sql index c51da11fab..5fb0a03256 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_distinct_values_query_with_metric_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_distinct_values_query_with_metric_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing',] SELECT diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql index 80ea78a3b4..2a8e7a810b 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql index 4b33a96ff2..c58aa1a132 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_with_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_with_conversion_metric__plan0.sql index c2b052f5ae..4d42a11ec4 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_with_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_with_conversion_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_with_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_with_conversion_metric__plan0_optimized.sql index dec277d828..a9d47ec14b 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_with_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_filter_with_conversion_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_group_by_has_local_entity_prefix__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_group_by_has_local_entity_prefix__plan0.sql index cb68a478d2..f4788cfa8d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_group_by_has_local_entity_prefix__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_group_by_has_local_entity_prefix__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_group_by_has_local_entity_prefix__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_group_by_has_local_entity_prefix__plan0_optimized.sql index 2ee174977a..0e8de0b2c0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_group_by_has_local_entity_prefix__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_group_by_has_local_entity_prefix__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_multi_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_multi_hop__plan0.sql index 1b53560738..0b97709bc4 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_multi_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_multi_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_19.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_multi_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_multi_hop__plan0_optimized.sql index bdcc03a79c..db440e96e5 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_multi_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_multi_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_single_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_single_hop__plan0.sql index bec29a0b16..6328abd797 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_single_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_single_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_12.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_single_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_single_hop__plan0_optimized.sql index d1a69b0cca..b770931cdc 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_single_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_inner_query_single_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0.sql index 82899255bb..234e08fae2 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0_optimized.sql index 2670479341..3eca4e552c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_filtered_by_itself__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_with_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_with_metric_in_where_filter__plan0.sql index 0923cdad58..27976d4688 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_with_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_with_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_with_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_with_metric_in_where_filter__plan0_optimized.sql index 6099c2233b..65b1f2a92d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_with_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_metric_with_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_cumulative_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_cumulative_metric_in_where_filter__plan0.sql index 086d5f502d..68767f88ef 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_cumulative_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_cumulative_metric_in_where_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql index aedda5822a..a124d15bc8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_derived_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_derived_metric_in_where_filter__plan0.sql index 1314332624..8665999a6f 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_derived_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_derived_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql index 7bb1c0f3a7..0cc3906e8e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_multiple_metrics_in_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_multiple_metrics_in_filter__plan0.sql index 6c5ab6be73..885e1c6e52 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_multiple_metrics_in_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_multiple_metrics_in_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_17.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql index 0a8508c1ae..7e2d36fc5c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_ratio_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_ratio_metric_in_where_filter__plan0.sql index 5fb61f3777..c79bda80af 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_ratio_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_ratio_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql index 8ff640f011..792f24c602 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_simple_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_simple_metric_in_where_filter__plan0.sql index c96a14a492..0cc20ad9a8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_simple_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_simple_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql index e163c214d3..7a35ec5149 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Redshift/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values_query_with_metric_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values_query_with_metric_filter__plan0.sql index 105fc0d592..e528353100 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values_query_with_metric_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values_query_with_metric_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Pass Only Elements: ['listing',] SELECT subq_8.listing diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values_query_with_metric_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values_query_with_metric_filter__plan0_optimized.sql index c51da11fab..5fb0a03256 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values_query_with_metric_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values_query_with_metric_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing',] SELECT diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql index bade6351d5..a61610e96d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql index 4b33a96ff2..c58aa1a132 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_conversion_metric__plan0.sql index 9b6a4a8e04..60230506a7 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_conversion_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_conversion_metric__plan0_optimized.sql index 39e457ef9a..4e88280d37 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_conversion_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_group_by_has_local_entity_prefix__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_group_by_has_local_entity_prefix__plan0.sql index 2971e555b6..1b3f5b177a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_group_by_has_local_entity_prefix__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_group_by_has_local_entity_prefix__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_group_by_has_local_entity_prefix__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_group_by_has_local_entity_prefix__plan0_optimized.sql index 2ee174977a..0e8de0b2c0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_group_by_has_local_entity_prefix__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_group_by_has_local_entity_prefix__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_multi_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_multi_hop__plan0.sql index 9ca112a5a4..03adce7aa3 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_multi_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_multi_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_19.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_multi_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_multi_hop__plan0_optimized.sql index bdcc03a79c..db440e96e5 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_multi_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_multi_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_single_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_single_hop__plan0.sql index a7560f5fbf..b787ceba7c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_single_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_single_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_12.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_single_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_single_hop__plan0_optimized.sql index d1a69b0cca..b770931cdc 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_single_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_inner_query_single_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_filtered_by_itself__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_filtered_by_itself__plan0.sql index 469c8c395b..1f235f366f 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_filtered_by_itself__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_filtered_by_itself__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_filtered_by_itself__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_filtered_by_itself__plan0_optimized.sql index 2670479341..3eca4e552c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_filtered_by_itself__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_filtered_by_itself__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_metric_in_where_filter__plan0.sql index 9a63113178..234484e399 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_metric_in_where_filter__plan0_optimized.sql index 6099c2233b..65b1f2a92d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_cumulative_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_cumulative_metric_in_where_filter__plan0.sql index ae321fc99b..fa7ef7fd73 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_cumulative_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_cumulative_metric_in_where_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql index aedda5822a..a124d15bc8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_derived_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_derived_metric_in_where_filter__plan0.sql index 9d91118e21..6a16c15f62 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_derived_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_derived_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql index 7bb1c0f3a7..0cc3906e8e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_multiple_metrics_in_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_multiple_metrics_in_filter__plan0.sql index fa1fccb8c1..857ae5f6a0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_multiple_metrics_in_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_multiple_metrics_in_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_17.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql index 0a8508c1ae..7e2d36fc5c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_ratio_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_ratio_metric_in_where_filter__plan0.sql index 3044226f24..92b03822ee 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_ratio_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_ratio_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql index c013b4d97f..e026c15bd8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_simple_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_simple_metric_in_where_filter__plan0.sql index 1df667ea27..672c18825a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_simple_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_simple_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql index e163c214d3..7a35ec5149 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Snowflake/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_distinct_values_query_with_metric_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_distinct_values_query_with_metric_filter__plan0.sql index a98d339aba..f346caeeb6 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_distinct_values_query_with_metric_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_distinct_values_query_with_metric_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Pass Only Elements: ['listing',] SELECT subq_8.listing diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_distinct_values_query_with_metric_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_distinct_values_query_with_metric_filter__plan0_optimized.sql index c51da11fab..5fb0a03256 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_distinct_values_query_with_metric_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_distinct_values_query_with_metric_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values_query_with_metric_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a distinct values query with a metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing',] SELECT diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql index 4996f2f570..b91eb0b0eb 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql index 4b33a96ff2..c58aa1a132 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_by_metric_in_same_semantic_model_as_queried_metric__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_by_metric_in_same_semantic_model_as_queried_metric +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_with_conversion_metric__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_with_conversion_metric__plan0.sql index 37467c2be3..082ba66662 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_with_conversion_metric__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_with_conversion_metric__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_22.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_with_conversion_metric__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_with_conversion_metric__plan0_optimized.sql index 875b6c43f5..1825d7ca7f 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_with_conversion_metric__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_filter_with_conversion_metric__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_filter_with_conversion_metric +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_group_by_has_local_entity_prefix__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_group_by_has_local_entity_prefix__plan0.sql index 536bb518f0..64d6e2968f 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_group_by_has_local_entity_prefix__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_group_by_has_local_entity_prefix__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_15.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_group_by_has_local_entity_prefix__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_group_by_has_local_entity_prefix__plan0_optimized.sql index 2ee174977a..0e8de0b2c0 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_group_by_has_local_entity_prefix__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_group_by_has_local_entity_prefix__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_group_by_has_local_entity_prefix +test_filename: test_metric_filter_rendering.py +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_multi_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_multi_hop__plan0.sql index 03fd42b5c8..37bdfaeb7e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_multi_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_multi_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_19.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_multi_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_multi_hop__plan0_optimized.sql index bdcc03a79c..db440e96e5 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_multi_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_multi_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_multi_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a two-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_single_hop__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_single_hop__plan0.sql index c02339224d..bcaf2cf5c9 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_single_hop__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_single_hop__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Compute Metrics via Expressions SELECT subq_12.third_hop_count diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_single_hop__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_single_hop__plan0_optimized.sql index d1a69b0cca..b770931cdc 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_single_hop__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_inner_query_single_hop__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_inner_query_single_hop +test_filename: test_metric_filter_rendering.py +docstring: + Tests rendering for a metric filter using a one-hop join in the inner query. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['third_hop_count',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0.sql index 759719ae56..71abe3ca04 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Compute Metrics via Expressions SELECT subq_11.bookers diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0_optimized.sql index 2670479341..3eca4e552c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_filtered_by_itself__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_filtered_by_itself +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query for a metric that filters by the same metric. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_with_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_with_metric_in_where_filter__plan0.sql index 0eb9df5f6d..c4be2983b9 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_with_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_with_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_with_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_with_metric_in_where_filter__plan0_optimized.sql index 6099c2233b..65b1f2a92d 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_with_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_metric_with_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_with_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a metric in the metric-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_cumulative_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_cumulative_metric_in_where_filter__plan0.sql index a02a059e59..42a7c6efb4 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_cumulative_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_cumulative_metric_in_where_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql index aedda5822a..a124d15bc8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_cumulative_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_query_with_cumulative_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a cumulative metric in the query-level where filter. + + Note this cumulative metric has no window / grain to date. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_derived_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_derived_metric_in_where_filter__plan0.sql index 8f86a49362..4a332cd37a 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_derived_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_derived_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql index 7bb1c0f3a7..0cc3906e8e 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_derived_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_derived_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a derived metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_multiple_metrics_in_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_multiple_metrics_in_filter__plan0.sql index 2b64cfd11e..cde6923a31 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_multiple_metrics_in_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_multiple_metrics_in_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_17.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql index 0a8508c1ae..7e2d36fc5c 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_multiple_metrics_in_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_multiple_metrics_in_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with 2 simple metrics in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_ratio_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_ratio_metric_in_where_filter__plan0.sql index d6035679dd..b13ddfaa52 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_ratio_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_ratio_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_18.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql index c013b4d97f..e026c15bd8 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_ratio_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_ratio_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a ratio metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_simple_metric_in_where_filter__plan0.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_simple_metric_in_where_filter__plan0.sql index d406e48ffd..f4fe6e2d75 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_simple_metric_in_where_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_simple_metric_in_where_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Compute Metrics via Expressions SELECT subq_11.listings diff --git a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql index e163c214d3..7a35ec5149 100644 --- a/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_filter_rendering.py/SqlQueryPlan/Trino/test_query_with_simple_metric_in_where_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_query_with_simple_metric_in_where_filter +test_filename: test_metric_filter_rendering.py +docstring: + Tests a query with a simple metric in the query-level where filter. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql index 0f4d7a261b..73497599b4 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Metric Time Dimension 'paid_at' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql index 4765363716..31f23d3326 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'paid_at' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql index b37cf45f23..421bc276da 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Metric Time Dimension 'ds' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql index 9a2bef3638..af52555b0a 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'ds' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_simple_query_with_metric_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_simple_query_with_metric_time_dimension__plan0.sql index d1715520f5..e36a697fa5 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_simple_query_with_metric_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_simple_query_with_metric_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_simple_query_with_metric_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_simple_query_with_metric_time_dimension__plan0_optimized.sql index 2c8a3982a3..f5130a4f67 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_simple_query_with_metric_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/BigQuery/test_simple_query_with_metric_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql index 0388b56613..1dc806ae11 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Metric Time Dimension 'paid_at' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql index 1868c1588e..e241a30870 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'paid_at' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql index 88d5d1906f..d03f569f74 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Metric Time Dimension 'ds' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql index c512d035ec..fd7a57820c 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'ds' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_simple_query_with_metric_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_simple_query_with_metric_time_dimension__plan0.sql index 3a67cd0d83..d5c009a9cd 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_simple_query_with_metric_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_simple_query_with_metric_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_simple_query_with_metric_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_simple_query_with_metric_time_dimension__plan0_optimized.sql index a308d09d3b..a0d215a3ed 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_simple_query_with_metric_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Databricks/test_simple_query_with_metric_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql index ff00293b12..68ea038a0a 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Metric Time Dimension 'paid_at' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql index 95cc2277b2..28e180572b 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'paid_at' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql index 9ac342b6b7..96b9cd03a5 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Metric Time Dimension 'ds' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql index b64a17519b..36f7a606e5 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'ds' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_simple_query_with_metric_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_simple_query_with_metric_time_dimension__plan0.sql index 67af06d832..1ff3e95f62 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_simple_query_with_metric_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_simple_query_with_metric_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_simple_query_with_metric_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_simple_query_with_metric_time_dimension__plan0_optimized.sql index a308d09d3b..a0d215a3ed 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_simple_query_with_metric_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/DuckDB/test_simple_query_with_metric_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql index ff00293b12..68ea038a0a 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Metric Time Dimension 'paid_at' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql index 95cc2277b2..28e180572b 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'paid_at' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql index 9ac342b6b7..96b9cd03a5 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Metric Time Dimension 'ds' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql index b64a17519b..36f7a606e5 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'ds' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_simple_query_with_metric_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_simple_query_with_metric_time_dimension__plan0.sql index 67af06d832..1ff3e95f62 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_simple_query_with_metric_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_simple_query_with_metric_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_simple_query_with_metric_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_simple_query_with_metric_time_dimension__plan0_optimized.sql index a308d09d3b..a0d215a3ed 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_simple_query_with_metric_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Postgres/test_simple_query_with_metric_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql index 675d367899..263a6ef549 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Metric Time Dimension 'paid_at' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql index d92c8d8a6c..1f07c57488 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'paid_at' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql index 87bbb56140..7e62c893aa 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Metric Time Dimension 'ds' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql index 0c2f267c46..715a787c7c 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'ds' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_simple_query_with_metric_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_simple_query_with_metric_time_dimension__plan0.sql index 93d5b90cf6..d142200562 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_simple_query_with_metric_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_simple_query_with_metric_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_simple_query_with_metric_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_simple_query_with_metric_time_dimension__plan0_optimized.sql index a308d09d3b..a0d215a3ed 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_simple_query_with_metric_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Redshift/test_simple_query_with_metric_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql index ad30c2bcb8..588f6c7873 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Metric Time Dimension 'paid_at' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql index d37a20ceb1..67adbd6a3b 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'paid_at' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql index e2f7af8a11..0dca84e4c9 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Metric Time Dimension 'ds' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql index 7e5ad1d6f1..edce5e2be4 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'ds' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_simple_query_with_metric_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_simple_query_with_metric_time_dimension__plan0.sql index 8006839d04..a8ce693bda 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_simple_query_with_metric_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_simple_query_with_metric_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_simple_query_with_metric_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_simple_query_with_metric_time_dimension__plan0_optimized.sql index a308d09d3b..a0d215a3ed 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_simple_query_with_metric_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Snowflake/test_simple_query_with_metric_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql index 52574048be..3df2f1a2c2 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Metric Time Dimension 'paid_at' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql index d4a0b62301..90cc628890 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_non_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'paid_at' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql index f38530451e..2287f87166 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_primary_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Metric Time Dimension 'ds' SELECT subq_0.ds__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql index 883c1ac470..f7c953e1f8 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_metric_time_dimension_transform_node_using_primary_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- -- Read Elements From Semantic Model 'bookings_source' -- Metric Time Dimension 'ds' SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_simple_query_with_metric_time_dimension__plan0.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_simple_query_with_metric_time_dimension__plan0.sql index 95b123bbac..37aafe7b5b 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_simple_query_with_metric_time_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_simple_query_with_metric_time_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_simple_query_with_metric_time_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_simple_query_with_metric_time_dimension__plan0_optimized.sql index a308d09d3b..a0d215a3ed 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_simple_query_with_metric_time_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/Trino/test_simple_query_with_metric_time_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_14.metric_time__day, subq_19.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.xml b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.xml index ac04ee9750..b67ed93740 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_non_primary_time__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_non_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using a non-primary time dimension to SQL. +--- diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_primary_time__plan0.xml b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_primary_time__plan0.xml index dc051c89ec..79a2b7ba4d 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_primary_time__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_metric_time_dimension_transform_node_using_primary_time__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_metric_time_dimension_transform_node_using_primary_time +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests converting a PlotTimeDimensionTransform node using the primary time dimension to SQL. +--- diff --git a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_simple_query_with_metric_time_dimension__plan0.xml b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_simple_query_with_metric_time_dimension__plan0.xml index cbbc25a9f4..1cd3f5424f 100644 --- a/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_simple_query_with_metric_time_dimension__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_dimension_to_sql.py/SqlQueryPlan/test_simple_query_with_metric_time_dimension__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_simple_query_with_metric_time_dimension +test_filename: test_metric_time_dimension_to_sql.py +docstring: + Tests building a query that uses measures defined from 2 different time dimensions. +--- diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql index 4387ca064f..1096d04332 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql index ee11e39060..2500289c9f 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql index 6d0dc32835..73ebd626a2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Pass Only Elements: ['metric_time__day',] SELECT subq_1.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql index aefc098bd3..cc03aeb1aa 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_only__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql index e4b99966b4..6cb6b584d8 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['metric_time__quarter',] SELECT subq_1.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0_optimized.sql index 81ede48103..a09b66151f 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_quarter_alone__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__quarter',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql index 1fd8948dea..db6e955106 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql index f03a3399ee..b753f25db6 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/BigQuery/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql index a0ff1aa632..a7535a999c 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql index f7f473a317..8916c032e2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql index bb3607324b..2071cfbd0f 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Pass Only Elements: ['metric_time__day',] SELECT subq_1.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql index ec27d0d54a..59e07f6409 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_only__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql index 3b2509ba59..4ad0532f6c 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['metric_time__quarter',] SELECT subq_1.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0_optimized.sql index d33ecb7c33..a723a21523 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_quarter_alone__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__quarter',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql index 8b126ffbc9..d63c51c14b 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql index 68e7b122d2..0b1c7ebd22 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Databricks/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0.sql index a38763a78d..6b6069c0e8 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0_optimized.sql index f7f473a317..8916c032e2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0.sql index d0ef8e46cd..2547c9c6d6 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Pass Only Elements: ['metric_time__day',] SELECT subq_1.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0_optimized.sql index ec27d0d54a..59e07f6409 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_only__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0.sql index 7f6e052f78..9b9f71ae8b 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['metric_time__quarter',] SELECT subq_1.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0_optimized.sql index d33ecb7c33..a723a21523 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_quarter_alone__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__quarter',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0.sql index 95837e5a9e..c54500cc61 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0_optimized.sql index 68e7b122d2..0b1c7ebd22 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/DuckDB/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql index a38763a78d..6b6069c0e8 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql index f7f473a317..8916c032e2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql index d0ef8e46cd..2547c9c6d6 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Pass Only Elements: ['metric_time__day',] SELECT subq_1.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql index ec27d0d54a..59e07f6409 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_only__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql index 7f6e052f78..9b9f71ae8b 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['metric_time__quarter',] SELECT subq_1.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0_optimized.sql index d33ecb7c33..a723a21523 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_quarter_alone__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__quarter',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql index 95837e5a9e..c54500cc61 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql index 68e7b122d2..0b1c7ebd22 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Postgres/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql index efea7cead8..c3e55e3b99 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql index f7f473a317..8916c032e2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql index 5bec066213..1efbcd910a 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Pass Only Elements: ['metric_time__day',] SELECT subq_1.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql index ec27d0d54a..59e07f6409 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_only__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql index 337475d3a2..739f064b85 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['metric_time__quarter',] SELECT subq_1.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0_optimized.sql index d33ecb7c33..a723a21523 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_quarter_alone__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__quarter',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql index 8aad8892d7..6ebdca8ecd 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql index 68e7b122d2..0b1c7ebd22 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Redshift/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql index b16fc5052e..0fc4150100 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql index f7f473a317..8916c032e2 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql index 1fc84bac61..b5a805e449 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Pass Only Elements: ['metric_time__day',] SELECT subq_1.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql index ec27d0d54a..59e07f6409 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_only__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql index 15d8073655..2fb7568d03 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['metric_time__quarter',] SELECT subq_1.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0_optimized.sql index d33ecb7c33..a723a21523 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_quarter_alone__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__quarter',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql index a61dba85b0..8ca5edc032 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql index 68e7b122d2..0b1c7ebd22 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Snowflake/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql index 26e9563b2e..5c90e2ff0c 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql index cd1bf9a23e..d219055e71 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_dimensions_with_time_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Constrain Time Range to [2020-01-01T00:00:00, 2020-01-03T00:00:00] -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql index 50c5d8dd99..87f4523408 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Pass Only Elements: ['metric_time__day',] SELECT subq_1.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql index ec27d0d54a..59e07f6409 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_only__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__day',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql index 0396f7bb24..2c481316e1 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['metric_time__quarter',] SELECT subq_1.metric_time__quarter diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0_optimized.sql index d33ecb7c33..a723a21523 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_quarter_alone__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- -- Time Spine -- Metric Time Dimension 'ds' -- Pass Only Elements: ['metric_time__quarter',] diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql index 84e2cf6d8e..edb47e1554 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql index 68e7b122d2..0b1c7ebd22 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/Trino/test_metric_time_with_other_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- -- Join Standard Outputs -- Pass Only Elements: ['user__home_state_latest', 'listing__is_lux_latest', 'metric_time__day'] SELECT diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_dimensions_with_time_constraint__plan0.xml b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_dimensions_with_time_constraint__plan0.xml index c969ff9725..a8f467e916 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_dimensions_with_time_constraint__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_dimensions_with_time_constraint__plan0.xml @@ -1,3 +1,6 @@ +test_name: test_dimensions_with_time_constraint +test_filename: test_metric_time_without_metrics.py +--- diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_only__plan0.xml b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_only__plan0.xml index 74e95d6fe0..bddd5d5644 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_only__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_only__plan0.xml @@ -1,3 +1,8 @@ +test_name: test_metric_time_only +test_filename: test_metric_time_without_metrics.py +docstring: + Tests querying only metric time. +--- diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_quarter_alone__plan0.xml b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_quarter_alone__plan0.xml index cd292a1dd8..5691e636ce 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_quarter_alone__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_quarter_alone__plan0.xml @@ -1,3 +1,6 @@ +test_name: test_metric_time_quarter_alone +test_filename: test_metric_time_without_metrics.py +--- diff --git a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_with_other_dimensions__plan0.xml b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_with_other_dimensions__plan0.xml index 356fbd4c20..05598e5ffc 100644 --- a/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_with_other_dimensions__plan0.xml +++ b/tests_metricflow/snapshots/test_metric_time_without_metrics.py/SqlQueryPlan/test_metric_time_with_other_dimensions__plan0.xml @@ -1,3 +1,6 @@ +test_name: test_metric_time_with_other_dimensions +test_filename: test_metric_time_without_metrics.py +--- diff --git a/tests_metricflow/snapshots/test_mf_engine.py/list/test_list_dimensions__result0.txt b/tests_metricflow/snapshots/test_mf_engine.py/list/test_list_dimensions__result0.txt index 424914614f..1db4a38fce 100644 --- a/tests_metricflow/snapshots/test_mf_engine.py/list/test_list_dimensions__result0.txt +++ b/tests_metricflow/snapshots/test_mf_engine.py/list/test_list_dimensions__result0.txt @@ -1,3 +1,6 @@ +test_name: test_list_dimensions +test_filename: test_mf_engine.py +--- [ 'account__account_type', 'account__ds', diff --git a/tests_metricflow/snapshots/test_node_data_set.py/list/test_joined_node_data_set__result0.txt b/tests_metricflow/snapshots/test_node_data_set.py/list/test_joined_node_data_set__result0.txt index d7e2365dbe..87e35ad7bc 100644 --- a/tests_metricflow/snapshots/test_node_data_set.py/list/test_joined_node_data_set__result0.txt +++ b/tests_metricflow/snapshots/test_node_data_set.py/list/test_joined_node_data_set__result0.txt @@ -1,3 +1,8 @@ +test_name: test_joined_node_data_set +test_filename: test_node_data_set.py +docstring: + Tests getting the data set from a dataflow plan with a join. +--- [ 'ds__day', 'ds__extract_day', diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt index 4589d9207f..12d136bed0 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_multiple_granularities +test_filename: test_offset_metrics.py +--- metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- 2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt index 09a4c151e2..dda3281d7f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/BigQuery/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_single_granularity +test_filename: test_offset_metrics.py +--- metric_time__day bookings_at_start_of_month ------------------- ---------------------------- 2019-12-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt index 4589d9207f..12d136bed0 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_multiple_granularities +test_filename: test_offset_metrics.py +--- metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- 2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt index 09a4c151e2..dda3281d7f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Databricks/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_single_granularity +test_filename: test_offset_metrics.py +--- metric_time__day bookings_at_start_of_month ------------------- ---------------------------- 2019-12-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt index 4589d9207f..12d136bed0 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_multiple_granularities +test_filename: test_offset_metrics.py +--- metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- 2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt index 09a4c151e2..dda3281d7f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/DuckDB/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_single_granularity +test_filename: test_offset_metrics.py +--- metric_time__day bookings_at_start_of_month ------------------- ---------------------------- 2019-12-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt index 4589d9207f..12d136bed0 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_multiple_granularities +test_filename: test_offset_metrics.py +--- metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- 2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt index 09a4c151e2..dda3281d7f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Postgres/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_single_granularity +test_filename: test_offset_metrics.py +--- metric_time__day bookings_at_start_of_month ------------------- ---------------------------- 2019-12-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt index 4589d9207f..12d136bed0 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_multiple_granularities +test_filename: test_offset_metrics.py +--- metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- 2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt index 09a4c151e2..dda3281d7f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Redshift/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_single_granularity +test_filename: test_offset_metrics.py +--- metric_time__day bookings_at_start_of_month ------------------- ---------------------------- 2019-12-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt index 9985dda031..af55627d63 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_multiple_granularities +test_filename: test_offset_metrics.py +--- METRIC_TIME__DAY METRIC_TIME__MONTH METRIC_TIME__YEAR BOOKINGS_AT_START_OF_MONTH ------------------- -------------------- ------------------- ---------------------------- 2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt index 7cb57b91da..75b35721f4 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Snowflake/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_single_granularity +test_filename: test_offset_metrics.py +--- METRIC_TIME__DAY BOOKINGS_AT_START_OF_MONTH ------------------- ---------------------------- 2019-12-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt index 4589d9207f..12d136bed0 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_multiple_granularities__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_multiple_granularities +test_filename: test_offset_metrics.py +--- metric_time__day metric_time__month metric_time__year bookings_at_start_of_month ------------------- -------------------- ------------------- ---------------------------- 2019-12-01T00:00:00 2019-12-01T00:00:00 2019-01-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt index 09a4c151e2..dda3281d7f 100644 --- a/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt +++ b/tests_metricflow/snapshots/test_offset_metrics.py/str/Trino/test_offset_to_grain_with_single_granularity__query_output.txt @@ -1,3 +1,6 @@ +test_name: test_offset_to_grain_with_single_granularity +test_filename: test_offset_metrics.py +--- metric_time__day bookings_at_start_of_month ------------------- ---------------------------- 2019-12-01T00:00:00 1 diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml index 9472dba119..ee060eb70c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfp_0.xml @@ -1,3 +1,10 @@ +test_name: test_conversion_metric_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. + + As of this time the pushdown should NOT move past the conversion metric node. +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfpo_0.xml index 72ac971202..3c8171e44e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_conversion_metric_predicate_pushdown__dfpo_0.xml @@ -1,3 +1,10 @@ +test_name: test_conversion_metric_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. + + As of this time the pushdown should NOT move past the conversion metric node. +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml index 7583c3cb21..1715b47e8a 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfp_0.xml @@ -1,3 +1,16 @@ +test_name: test_cumulative_metric_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + At this time categorical dimension predicates should be pushed down, but metric_time predicates should not be, + since supporting time filter pushdown for cumulative metrics requires filter expansion to ensure we capture the + full set of inputs for the initial cumulative window. + + For the query listed here the entire constraint will be moved past the dimension join. + + TODO: Add metric time filters +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfpo_0.xml index cc2601c7f4..7f88f3111d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_cumulative_metric_predicate_pushdown__dfpo_0.xml @@ -1,3 +1,16 @@ +test_name: test_cumulative_metric_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + At this time categorical dimension predicates should be pushed down, but metric_time predicates should not be, + since supporting time filter pushdown for cumulative metrics requires filter expansion to ensure we capture the + full set of inputs for the initial cumulative window. + + For the query listed here the entire constraint will be moved past the dimension join. + + TODO: Add metric time filters +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml index 58ddfdb414..a6b9017bcc 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfp_0.xml @@ -1,3 +1,14 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + Until time dimension pushdown is supported we will only see the categorical dimension entry pushed down here. + + For the query listed here the entire constraint will be moved past the dimension join. + + TODO: Add metric time filters +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfpo_0.xml index 6bc6a4c5e4..1a7bf440d1 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_predicate_pushdown__dfpo_0.xml @@ -1,3 +1,14 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + Until time dimension pushdown is supported we will only see the categorical dimension entry pushed down here. + + For the query listed here the entire constraint will be moved past the dimension join. + + TODO: Add metric time filters +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml index 97d6d08be9..349319f1f4 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfp_0.xml @@ -1,3 +1,20 @@ +test_name: test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with and a post-agg join. + + When querying a metric like this with a group by on all filter specs we do a post-aggregation outer join + against the time spine, which should preclude predicate pushdown for query-time filters at that state, but + will allow for pushdown within the JoinToTimeSpine operation. This will still do predicate pushdown as before, + but only exactly as before - the added constraint outside of the JoinToTimeSpine operation must still be + applied in its entirety, and so we expect 0 additional constraint nodes. If we failed to account for the + repeated constraint outside of the JoinToTimeSpine in our pushdown handling this would remove one of the + WhereConstraintNodes from the original query altogether. + + Until time dimension pushdown is supported we will only see the categorical dimension entry pushed down here. + + TODO: Add metric time filters +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfpo_0.xml index 13332bddb2..594a2144f0 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown__dfpo_0.xml @@ -1,3 +1,20 @@ +test_name: test_fill_nulls_time_spine_metric_with_post_agg_join_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with and a post-agg join. + + When querying a metric like this with a group by on all filter specs we do a post-aggregation outer join + against the time spine, which should preclude predicate pushdown for query-time filters at that state, but + will allow for pushdown within the JoinToTimeSpine operation. This will still do predicate pushdown as before, + but only exactly as before - the added constraint outside of the JoinToTimeSpine operation must still be + applied in its entirety, and so we expect 0 additional constraint nodes. If we failed to account for the + repeated constraint outside of the JoinToTimeSpine in our pushdown handling this would remove one of the + WhereConstraintNodes from the original query altogether. + + Until time dimension pushdown is supported we will only see the categorical dimension entry pushed down here. + + TODO: Add metric time filters +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml index 8e348736ca..08bfdf7469 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfp_0.xml @@ -1,3 +1,15 @@ +test_name: test_offset_metric_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + As with cumulative metrics, at this time categorical dimension predicates may be pushed down, but metric_time + predicates should not be, since we need to capture the union of the filter window and the offset span. + + For the query listed here the entire constraint will be moved past the dimension join. + + TODO: Add metric time filters +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfpo_0.xml index 4cd53b1290..8a861b78d7 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_offset_metric_predicate_pushdown__dfpo_0.xml @@ -1,3 +1,15 @@ +test_name: test_offset_metric_predicate_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + As with cumulative metrics, at this time categorical dimension predicates may be pushed down, but metric_time + predicates should not be, since we need to capture the union of the filter window and the offset span. + + For the query listed here the entire constraint will be moved past the dimension join. + + TODO: Add metric time filters +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml index dafdce1114..84691a27f7 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfp_0.xml @@ -1,3 +1,10 @@ +test_name: test_simple_join_categorical_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimization for a simple predicate through a single join. + + In this case the entire constraint should be moved inside of the join. +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfpo_0.xml index b77327cfc9..d6cc919ffb 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_categorical_pushdown__dfpo_0.xml @@ -1,3 +1,10 @@ +test_name: test_simple_join_categorical_pushdown +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimization for a simple predicate through a single join. + + In this case the entire constraint should be moved inside of the join. +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml index 6e4e1bf1bf..71d459f80a 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfp_0.xml @@ -1,3 +1,13 @@ +test_name: test_simple_join_metric_time_pushdown_with_two_targets +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This includes a scenario where the dimension source is also a metric time node, but we do NOT want the metric_time + filter applied to it since it is a _current style dimension table at its core. + + Note this optimizer will not push the predicate down until metric_time pushdown is supported. +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfpo_0.xml b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfpo_0.xml index 9364d5ed29..c9e0d1580d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_predicate_pushdown_optimizer.py/DataflowPlan/test_simple_join_metric_time_pushdown_with_two_targets__dfpo_0.xml @@ -1,3 +1,13 @@ +test_name: test_simple_join_metric_time_pushdown_with_two_targets +test_filename: test_predicate_pushdown_optimizer.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This includes a scenario where the dimension source is also a metric time node, but we do NOT want the metric_time + filter applied to it since it is a _current style dimension table at its core. + + Note this optimizer will not push the predicate down until metric_time pushdown is supported. +--- diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_query_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_query_filters__plan0.sql index 97fd1b4564..3feb3ba999 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_query_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_query_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_query_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_query_filters__plan0_optimized.sql index 27f60e49d9..6d7d38c169 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_query_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_conversion_metric_query_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_query_time_filters__plan0.sql index 738d306890..4b6e6adf7f 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql index 44b0628847..88075da6df 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'listing__country_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql index bd750d895a..14496008b4 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql index c14baa3745..af144aacdd 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql index 6e84bfe520..e1447372ff 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_29.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql index 467673f052..983054249e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_metric_time_filter_with_two_targets__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_metric_time_filter_with_two_targets__plan0.sql index 530c2590ee..55b2ab2d8c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_metric_time_filter_with_two_targets__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_metric_time_filter_with_two_targets__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_metric_time_filter_with_two_targets__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_metric_time_filter_with_two_targets__plan0_optimized.sql index 30a396e107..e770e38556 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_metric_time_filter_with_two_targets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_metric_time_filter_with_two_targets__plan0_optimized.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_multiple_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_multiple_categorical_dimension_pushdown__plan0.sql index ddeb4db614..4f83932095 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_multiple_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_multiple_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql index 60e6d669df..c76f7f1427 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'user__home_state_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_offset_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_offset_metric_with_query_time_filters__plan0.sql index a776d02c5c..540bcd38e0 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_offset_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_offset_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_23.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_offset_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_offset_metric_with_query_time_filters__plan0_optimized.sql index c8af3ffcf0..49be3861e2 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_offset_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_offset_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_saved_query_with_metric_joins_and_filter__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_saved_query_with_metric_joins_and_filter__plan0.sql index 271e615b8e..6ff186e149 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_saved_query_with_metric_joins_and_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_saved_query_with_metric_joins_and_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_9.listing__capacity_latest, subq_19.listing__capacity_latest, subq_41.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql index 22905b26d0..5886895579 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_51.listing__capacity_latest, subq_61.listing__capacity_latest, subq_82.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql index a2a2d73442..3cee2650ea 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql index f1b60a40af..ca712fdf1c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Constrain Output with WHERE -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_single_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_single_categorical_dimension_pushdown__plan0.sql index 473280edbe..2614f9e6b3 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_single_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_single_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_single_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_single_categorical_dimension_pushdown__plan0_optimized.sql index 364f112122..62acfda0aa 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_single_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_single_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_skipped_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_skipped_pushdown__plan0.sql index 8567c48788..67e0c2202e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_skipped_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_skipped_pushdown__plan0.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_skipped_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_skipped_pushdown__plan0_optimized.sql index 307eb5e373..e0f56965fe 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_skipped_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/BigQuery/test_skipped_pushdown__plan0_optimized.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_query_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_query_filters__plan0.sql index 03c0e1ef02..2cc1c1ae9f 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_query_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_query_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_query_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_query_filters__plan0_optimized.sql index 9bce198066..57b0a76dfd 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_query_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_conversion_metric_query_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_query_time_filters__plan0.sql index 75ee3b1826..94fdf3eec8 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql index 29e9a90e58..aa9b912d60 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'listing__country_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql index 89077f2f30..cbeeb54246 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql index 0c6ee58285..7a278ac5b1 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql index bbdca1833d..d3596f3aef 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_29.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql index 40d7f1621a..c002c5ca7c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_metric_time_filter_with_two_targets__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_metric_time_filter_with_two_targets__plan0.sql index d641126e39..0119340f1f 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_metric_time_filter_with_two_targets__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_metric_time_filter_with_two_targets__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_metric_time_filter_with_two_targets__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_metric_time_filter_with_two_targets__plan0_optimized.sql index 6151674d33..fff21f640e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_metric_time_filter_with_two_targets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_metric_time_filter_with_two_targets__plan0_optimized.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_multiple_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_multiple_categorical_dimension_pushdown__plan0.sql index d401c425ce..fe9178950d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_multiple_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_multiple_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql index 60e6d669df..c76f7f1427 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'user__home_state_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_offset_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_offset_metric_with_query_time_filters__plan0.sql index 072a3fc3d0..637232821e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_offset_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_offset_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_23.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_offset_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_offset_metric_with_query_time_filters__plan0_optimized.sql index 1f582c5c68..3a91a82d24 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_offset_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_offset_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_saved_query_with_metric_joins_and_filter__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_saved_query_with_metric_joins_and_filter__plan0.sql index 2132246f20..ab49ec9428 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_saved_query_with_metric_joins_and_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_saved_query_with_metric_joins_and_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_9.listing__capacity_latest, subq_19.listing__capacity_latest, subq_41.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql index 9985ab9657..0c1bf25a67 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_51.listing__capacity_latest, subq_61.listing__capacity_latest, subq_82.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql index 534003a967..28cbd46175 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql index 8892599ad9..85d5041993 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Constrain Output with WHERE -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_single_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_single_categorical_dimension_pushdown__plan0.sql index b9fc011ec1..5544cb8074 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_single_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_single_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_single_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_single_categorical_dimension_pushdown__plan0_optimized.sql index 364f112122..62acfda0aa 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_single_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_single_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_skipped_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_skipped_pushdown__plan0.sql index aaed2b5cee..10d0a8ce17 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_skipped_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_skipped_pushdown__plan0.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_skipped_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_skipped_pushdown__plan0_optimized.sql index 307eb5e373..e0f56965fe 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_skipped_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Databricks/test_skipped_pushdown__plan0_optimized.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_query_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_query_filters__plan0.sql index 86cb983855..7040d87d26 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_query_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_query_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_query_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_query_filters__plan0_optimized.sql index 4bc9965238..b271894e89 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_query_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_conversion_metric_query_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_query_time_filters__plan0.sql index fc3ffc1821..58f05a117d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql index 608581b6c8..befb96acc3 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'listing__country_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql index 93d872a5cb..8594845978 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql index 0c6ee58285..7a278ac5b1 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql index ee20df31e8..1a15d85803 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_29.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql index ca147fa483..0006c63bef 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_metric_time_filter_with_two_targets__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_metric_time_filter_with_two_targets__plan0.sql index 2385eef342..2174a64459 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_metric_time_filter_with_two_targets__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_metric_time_filter_with_two_targets__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_metric_time_filter_with_two_targets__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_metric_time_filter_with_two_targets__plan0_optimized.sql index 6151674d33..fff21f640e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_metric_time_filter_with_two_targets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_metric_time_filter_with_two_targets__plan0_optimized.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_multiple_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_multiple_categorical_dimension_pushdown__plan0.sql index 13e98ddaee..f35cbde714 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_multiple_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_multiple_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql index 60e6d669df..c76f7f1427 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'user__home_state_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_offset_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_offset_metric_with_query_time_filters__plan0.sql index 1bc58a595d..611eac96c3 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_offset_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_offset_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_23.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_offset_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_offset_metric_with_query_time_filters__plan0_optimized.sql index 7db155f604..a40a5f7006 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_offset_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_offset_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_saved_query_with_metric_joins_and_filter__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_saved_query_with_metric_joins_and_filter__plan0.sql index b5494a0d96..bdba23f34e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_saved_query_with_metric_joins_and_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_saved_query_with_metric_joins_and_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_9.listing__capacity_latest, subq_19.listing__capacity_latest, subq_41.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql index 9985ab9657..0c1bf25a67 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_51.listing__capacity_latest, subq_61.listing__capacity_latest, subq_82.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql index 253f706615..92d58ea519 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql index 8892599ad9..85d5041993 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Constrain Output with WHERE -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_single_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_single_categorical_dimension_pushdown__plan0.sql index 105a08fac8..e16175f38d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_single_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_single_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_single_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_single_categorical_dimension_pushdown__plan0_optimized.sql index 364f112122..62acfda0aa 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_single_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_single_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_skipped_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_skipped_pushdown__plan0.sql index 404743573f..09d9fd001d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_skipped_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_skipped_pushdown__plan0.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_skipped_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_skipped_pushdown__plan0_optimized.sql index 307eb5e373..e0f56965fe 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_skipped_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/DuckDB/test_skipped_pushdown__plan0_optimized.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_query_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_query_filters__plan0.sql index eb54cfea0d..cc1d0a3eb6 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_query_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_query_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_query_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_query_filters__plan0_optimized.sql index 58a163cdc0..850dd7e7a7 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_query_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_conversion_metric_query_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_query_time_filters__plan0.sql index 845f253d70..358fb1e997 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql index eb3b132b63..60f409f19f 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'listing__country_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql index e1d5475987..eb55f216ee 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql index 1134b50986..26f0ee33ab 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql index b57856b382..01f87d425a 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_29.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql index 68b55168cd..b85b366958 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_metric_time_filter_with_two_targets__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_metric_time_filter_with_two_targets__plan0.sql index 2385eef342..2174a64459 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_metric_time_filter_with_two_targets__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_metric_time_filter_with_two_targets__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_metric_time_filter_with_two_targets__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_metric_time_filter_with_two_targets__plan0_optimized.sql index 6151674d33..fff21f640e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_metric_time_filter_with_two_targets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_metric_time_filter_with_two_targets__plan0_optimized.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_multiple_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_multiple_categorical_dimension_pushdown__plan0.sql index 13e98ddaee..f35cbde714 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_multiple_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_multiple_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql index 60e6d669df..c76f7f1427 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'user__home_state_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_offset_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_offset_metric_with_query_time_filters__plan0.sql index 1f857e64c5..d5031e921a 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_offset_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_offset_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_23.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_offset_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_offset_metric_with_query_time_filters__plan0_optimized.sql index 56637d4670..61c042b4d1 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_offset_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_offset_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_saved_query_with_metric_joins_and_filter__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_saved_query_with_metric_joins_and_filter__plan0.sql index 22af9fe80b..ecbc62366f 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_saved_query_with_metric_joins_and_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_saved_query_with_metric_joins_and_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_9.listing__capacity_latest, subq_19.listing__capacity_latest, subq_41.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql index 7028dcf89e..45124f0853 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_51.listing__capacity_latest, subq_61.listing__capacity_latest, subq_82.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql index 253f706615..92d58ea519 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql index 8892599ad9..85d5041993 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Constrain Output with WHERE -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_single_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_single_categorical_dimension_pushdown__plan0.sql index 105a08fac8..e16175f38d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_single_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_single_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_single_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_single_categorical_dimension_pushdown__plan0_optimized.sql index 364f112122..62acfda0aa 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_single_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_single_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_skipped_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_skipped_pushdown__plan0.sql index 404743573f..09d9fd001d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_skipped_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_skipped_pushdown__plan0.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_skipped_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_skipped_pushdown__plan0_optimized.sql index 307eb5e373..e0f56965fe 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_skipped_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Postgres/test_skipped_pushdown__plan0_optimized.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_query_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_query_filters__plan0.sql index b8fcd5eea2..0975b8b06f 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_query_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_query_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_query_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_query_filters__plan0_optimized.sql index 81c986b881..cb9bd5006c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_query_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_conversion_metric_query_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_query_time_filters__plan0.sql index 3945d96860..db2757daf4 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql index 29e9a90e58..aa9b912d60 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'listing__country_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql index 66674b279a..3b26842c8b 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql index 1134b50986..26f0ee33ab 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql index d38c1d6850..b0621548d5 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_29.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql index 40d7f1621a..c002c5ca7c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_metric_time_filter_with_two_targets__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_metric_time_filter_with_two_targets__plan0.sql index e7233c5ae6..b246076a56 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_metric_time_filter_with_two_targets__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_metric_time_filter_with_two_targets__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_metric_time_filter_with_two_targets__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_metric_time_filter_with_two_targets__plan0_optimized.sql index 6151674d33..fff21f640e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_metric_time_filter_with_two_targets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_metric_time_filter_with_two_targets__plan0_optimized.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_multiple_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_multiple_categorical_dimension_pushdown__plan0.sql index c3684eb57f..c1239682c1 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_multiple_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_multiple_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql index 60e6d669df..c76f7f1427 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'user__home_state_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_offset_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_offset_metric_with_query_time_filters__plan0.sql index 6b7dd29284..c31ca3a076 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_offset_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_offset_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_23.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_offset_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_offset_metric_with_query_time_filters__plan0_optimized.sql index 1f582c5c68..3a91a82d24 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_offset_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_offset_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_saved_query_with_metric_joins_and_filter__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_saved_query_with_metric_joins_and_filter__plan0.sql index a01fb7675d..1ddfa04914 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_saved_query_with_metric_joins_and_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_saved_query_with_metric_joins_and_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_9.listing__capacity_latest, subq_19.listing__capacity_latest, subq_41.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql index 7028dcf89e..45124f0853 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_51.listing__capacity_latest, subq_61.listing__capacity_latest, subq_82.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql index 155a4b7f42..ffdcb0305c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql index 8892599ad9..85d5041993 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Constrain Output with WHERE -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_single_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_single_categorical_dimension_pushdown__plan0.sql index ecd8552c60..5229d8837d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_single_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_single_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_single_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_single_categorical_dimension_pushdown__plan0_optimized.sql index 364f112122..62acfda0aa 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_single_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_single_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_skipped_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_skipped_pushdown__plan0.sql index ed5ec92c9b..a40ce20bbd 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_skipped_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_skipped_pushdown__plan0.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_skipped_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_skipped_pushdown__plan0_optimized.sql index 307eb5e373..e0f56965fe 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_skipped_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Redshift/test_skipped_pushdown__plan0_optimized.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_query_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_query_filters__plan0.sql index da151b644f..fbbe84646f 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_query_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_query_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_query_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_query_filters__plan0_optimized.sql index 24457c9887..cb99670ef2 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_query_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_conversion_metric_query_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_query_time_filters__plan0.sql index 04651b2347..856325ebd5 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql index 29e9a90e58..aa9b912d60 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'listing__country_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql index e1536572cb..316a8d9ac2 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql index 0c6ee58285..7a278ac5b1 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql index eeffd24149..82b90bb023 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_29.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql index 40d7f1621a..c002c5ca7c 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_metric_time_filter_with_two_targets__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_metric_time_filter_with_two_targets__plan0.sql index 4954be4c18..80c29272bc 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_metric_time_filter_with_two_targets__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_metric_time_filter_with_two_targets__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_metric_time_filter_with_two_targets__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_metric_time_filter_with_two_targets__plan0_optimized.sql index 6151674d33..fff21f640e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_metric_time_filter_with_two_targets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_metric_time_filter_with_two_targets__plan0_optimized.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_multiple_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_multiple_categorical_dimension_pushdown__plan0.sql index b2318240c7..6c0f2ca7fa 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_multiple_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_multiple_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql index 60e6d669df..c76f7f1427 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'user__home_state_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_offset_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_offset_metric_with_query_time_filters__plan0.sql index 0b919f0357..a627ce7bf4 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_offset_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_offset_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_23.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_offset_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_offset_metric_with_query_time_filters__plan0_optimized.sql index 1f582c5c68..3a91a82d24 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_offset_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_offset_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_saved_query_with_metric_joins_and_filter__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_saved_query_with_metric_joins_and_filter__plan0.sql index c720e086c7..feabf4a96f 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_saved_query_with_metric_joins_and_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_saved_query_with_metric_joins_and_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_9.listing__capacity_latest, subq_19.listing__capacity_latest, subq_41.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql index 9985ab9657..0c1bf25a67 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_51.listing__capacity_latest, subq_61.listing__capacity_latest, subq_82.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql index 139122ca06..29c579a38a 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql index 8892599ad9..85d5041993 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Constrain Output with WHERE -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_single_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_single_categorical_dimension_pushdown__plan0.sql index acde939d1b..5c0b6fe6ed 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_single_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_single_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_single_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_single_categorical_dimension_pushdown__plan0_optimized.sql index 364f112122..62acfda0aa 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_single_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_single_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_skipped_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_skipped_pushdown__plan0.sql index d36f7509e5..79c655d396 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_skipped_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_skipped_pushdown__plan0.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_skipped_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_skipped_pushdown__plan0_optimized.sql index 307eb5e373..e0f56965fe 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_skipped_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Snowflake/test_skipped_pushdown__plan0_optimized.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_query_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_query_filters__plan0.sql index b9c90e096a..2277f3bd21 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_query_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_query_filters__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT subq_22.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_query_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_query_filters__plan0_optimized.sql index b75120b438..4d3d7932c5 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_query_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_conversion_metric_query_filters__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_conversion_metric_query_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a simple predicate on a conversion metric. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_query_time_filters__plan0.sql index d28e47c77f..d72c6ae78e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql index 775a0dae74..e27dc2bf64 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_cumulative_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_cumulative_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a cumulative metric. + + TODO: support metric time filters +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookers', 'listing__country_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql index fa2fee8e9a..7204cc7313 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_different_filters_on_same_measure_source_categorical_dimension__plan0.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql index 0c6ee58285..7a278ac5b1 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_different_filters_on_same_measure_source_categorical_dimension__plan0_optimized.sql @@ -1,3 +1,16 @@ +test_name: test_different_filters_on_same_measure_source_categorical_dimension +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where multiple filters against the same measure dimension need to be an effective OR. + + This can be an issue where a derived metric takes in two filters that refer to the same dimension from the input + measure source. If these filters are disjoint the predicate pushdown needs to ensure that all matching rows are + returned, so we cannot simply push one filter or the other down, nor can we push them down as an AND - they + must be an OR, since all relevant rows need to be returned to the requesting metrics. + + The metric listed here has one input that filters on bookings__is_instant and another that does not, which means + the source input for the latter input must NOT have the filter applied to it. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql index 9a437083a5..0f94785d85 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_29.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql index 1d1c989ff5..9c0ef06187 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_fill_nulls_time_spine_metric_predicate_pushdown__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_fill_nulls_time_spine_metric_predicate_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a metric with a time spine and fill_nulls_with enabled. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_metric_time_filter_with_two_targets__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_metric_time_filter_with_two_targets__plan0.sql index 15778f2541..17fbdb6183 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_metric_time_filter_with_two_targets__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_metric_time_filter_with_two_targets__plan0.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_metric_time_filter_with_two_targets__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_metric_time_filter_with_two_targets__plan0_optimized.sql index 6151674d33..fff21f640e 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_metric_time_filter_with_two_targets__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_metric_time_filter_with_two_targets__plan0_optimized.sql @@ -1,3 +1,11 @@ +test_name: test_metric_time_filter_with_two_targets +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimization for a simple metric time predicate through a single join. + + This is currently a no-op for the pushdown optimizer. + TODO: support metric time pushdown +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_multiple_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_multiple_categorical_dimension_pushdown__plan0.sql index a40f6dae85..0694353993 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_multiple_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_multiple_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql index 60e6d669df..c76f7f1427 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_multiple_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multiple_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for more than one categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listings', 'user__home_state_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_offset_metric_with_query_time_filters__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_offset_metric_with_query_time_filters__plan0.sql index 58b9768f61..fb6ecb218a 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_offset_metric_with_query_time_filters__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_offset_metric_with_query_time_filters__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT subq_23.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_offset_metric_with_query_time_filters__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_offset_metric_with_query_time_filters__plan0_optimized.sql index bccbbae58f..7d23164e8d 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_offset_metric_with_query_time_filters__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_offset_metric_with_query_time_filters__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_offset_metric_with_query_time_filters +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests pushdown optimizer behavior for a query against a derived offset metric. + + TODO: support metric time filters +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_saved_query_with_metric_joins_and_filter__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_saved_query_with_metric_joins_and_filter__plan0.sql index 18ca6239d1..f1010eb089 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_saved_query_with_metric_joins_and_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_saved_query_with_metric_joins_and_filter__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_9.listing__capacity_latest, subq_19.listing__capacity_latest, subq_41.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql index 9985ab9657..0c1bf25a67 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_saved_query_with_metric_joins_and_filter__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_saved_query_with_metric_joins_and_filter +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_51.listing__capacity_latest, subq_61.listing__capacity_latest, subq_82.listing__capacity_latest) AS listing__capacity_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql index 632be9a929..3210c9e531 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_pushdown_filter_application__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql index 8892599ad9..85d5041993 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_pushdown_filter_application__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_simple_join_to_time_spine_pushdown_filter_application +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we join to a time spine and query the filter input. + + This should produce a SQL query that applies the filter outside of the time spine join. +--- -- Constrain Output with WHERE -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_single_categorical_dimension_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_single_categorical_dimension_pushdown__plan0.sql index b8bd86bf20..894f4591a9 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_single_categorical_dimension_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_single_categorical_dimension_pushdown__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_single_categorical_dimension_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_single_categorical_dimension_pushdown__plan0_optimized.sql index 364f112122..62acfda0aa 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_single_categorical_dimension_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_single_categorical_dimension_pushdown__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_single_categorical_dimension_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect predicate pushdown for a single categorical dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_skipped_pushdown__plan0.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_skipped_pushdown__plan0.sql index 7389578001..47fef186b5 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_skipped_pushdown__plan0.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_skipped_pushdown__plan0.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Compute Metrics via Expressions SELECT subq_8.listing__country_latest diff --git a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_skipped_pushdown__plan0_optimized.sql b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_skipped_pushdown__plan0_optimized.sql index 307eb5e373..e0f56965fe 100644 --- a/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_skipped_pushdown__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_predicate_pushdown_rendering.py/SqlQueryPlan/Trino/test_skipped_pushdown__plan0_optimized.sql @@ -1,3 +1,13 @@ +test_name: test_skipped_pushdown +test_filename: test_predicate_pushdown_rendering.py +docstring: + Tests rendering a query where we expect to skip predicate pushdown because it is unsafe. + + This is the query rendering test for the scenarios where the push down evaluation indicates that we should + skip pushdown, typically due to a lack of certainty over whether or not the query will return the same results. + + The specific scenario is less important here than that it match one that should not be pushed down. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'listing__country_latest'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_common_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_common_semantic_model__plan0.sql index e0013d8e83..42b1e0db7a 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_common_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_common_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_common_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_common_semantic_model__plan0_optimized.sql index 9b8db09ca2..60e4266f60 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_common_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_common_semantic_model__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values__plan0.sql index d6107b7b08..90412b40a6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Order By ['listing__country_latest'] Limit 100 SELECT subq_2.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values__plan0_optimized.sql index 1653ada5bd..8c59ff210d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_distinct_values__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__country_latest',] -- Order By ['listing__country_latest'] Limit 100 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_on_join_dim__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_on_join_dim__plan0.sql index a2257be72a..8e043b0efd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_on_join_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_on_join_dim__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_8.booking__is_instant diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql index b471f38fed..bed21753f3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'booking__is_instant'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_join_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_join_to_scd_dimension__plan0.sql index 1f859837dd..02f2bd4ebd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_join_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_join_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_join_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_join_to_scd_dimension__plan0_optimized.sql index 693d2bee4c..5e2c0303e8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_join_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_join_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_limit_rows__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_limit_rows__plan0.sql index 0695f376de..1f48dbe765 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_limit_rows__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_limit_rows__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Order By [] Limit 1 SELECT subq_4.ds__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_limit_rows__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_limit_rows__plan0_optimized.sql index c202cbf5d8..43d4b6eb57 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_limit_rows__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_limit_rows__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By [] Limit 1 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_local_dimension_using_local_entity__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_local_dimension_using_local_entity__plan0.sql index 576ebf36a2..6edaea28c0 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_local_dimension_using_local_entity__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_local_dimension_using_local_entity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_local_dimension_using_local_entity__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_local_dimension_using_local_entity__plan0_optimized.sql index 5d5e3407c2..b0b62597fa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_local_dimension_using_local_entity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_local_dimension_using_local_entity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint__plan0.sql index c05c1c20a4..65d4732f5e 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_25.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint__plan0_optimized.sql index c2e0dc76e2..ab135619b6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_reused_measure__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_reused_measure__plan0.sql index d8bb800366..b3c2699003 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_reused_measure__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_reused_measure__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_reused_measure__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_reused_measure__plan0_optimized.sql index 83d3a37922..e09d102113 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_reused_measure__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_reused_measure__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_single_expr_and_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_single_expr_and_alias__plan0.sql index 42b85c8d5f..4374f6edd7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_single_expr_and_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_single_expr_and_alias__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql index 5364fd7e52..e6c54c1bd2 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql index 04b9d1b85a..b6c9b2c2d7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_10.bookings AS FLOAT64) / CAST(NULLIF(subq_10.listings, 0) AS FLOAT64) AS bookings_per_listing diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql index e8010435c4..d231fa8be7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql index ee3b7b0a03..aeef010bf6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql index f24a9803be..1fec15d793 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql index 373cc9f2ce..0d116d1629 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0_optimized.sql index 02d3002c6c..76e59f03c0 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_metric_time_week__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_categorical__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_categorical__plan0.sql index 38c505143e..987f120fe8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_categorical__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_categorical__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(subq_1.listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_categorical__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_categorical__plan0_optimized.sql index d150e133e9..9de785ebe2 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_categorical__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_categorical__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time__plan0.sql index bc54ab0bf5..637b8a4cba 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time__plan0_optimized.sql index 5910729ad7..8044c9d46e 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time_quarter__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time_quarter__plan0.sql index 4375037c0d..f507532004 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time_quarter__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time_quarter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time_quarter__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time_quarter__plan0_optimized.sql index 304ed34df9..cc5ae62729 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time_quarter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_min_max_only_time_quarter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_through_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_through_scd_dimension__plan0.sql index 99304d85d6..9cdf72ddb6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_through_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_through_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_through_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_through_scd_dimension__plan0_optimized.sql index 59092a36c5..3676b5e537 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_through_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_through_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__home_state_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_to_scd_dimension__plan0.sql index ed01d37bd3..f32cb5fd87 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_to_scd_dimension__plan0_optimized.sql index 689c55c454..f4764e5931 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multi_hop_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__lux_listing__is_confirmed_lux', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0.sql index e6a233bf87..2635900f13 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_11.account_id__customer_id__customer_name diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0_optimized.sql index 36f8701526..fefdec9a37 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multihop_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs -- Pass Only Elements: ['txn_count', 'account_id__customer_id__customer_name'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multiple_metrics_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multiple_metrics_no_dimensions__plan0.sql index 50dda82c59..5deedc9cff 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multiple_metrics_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multiple_metrics_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_5.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multiple_metrics_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multiple_metrics_no_dimensions__plan0_optimized.sql index 1105f00c5d..7fb75f25fa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multiple_metrics_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_multiple_metrics_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_17.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_non_additive_dimension_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_non_additive_dimension_with_non_default_grain__plan0.sql index 473adf9d42..233893178a 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_non_additive_dimension_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_non_additive_dimension_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Compute Metrics via Expressions SELECT subq_6.total_account_balance_first_day_of_month diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql index 2691f061d3..413e508281 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Join on MIN(ds_month) and [] grouping by None -- Pass Only Elements: ['total_account_balance_first_day_of_month',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0.sql index ff47159240..08965b0b9f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0_optimized.sql index b37c01d2b5..f5877f4cc2 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/BigQuery/test_partitioned_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Join Standard Outputs -- Pass Only Elements: ['identity_verifications', 'user__home_state'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_common_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_common_semantic_model__plan0.sql index fd9a03aeaa..a928cc2f94 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_common_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_common_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_common_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_common_semantic_model__plan0_optimized.sql index e0c3b7024e..5f4e5efab5 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_common_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_common_semantic_model__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_distinct_values__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_distinct_values__plan0.sql index e9ee0c5d30..3eda1a3193 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_distinct_values__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_distinct_values__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Order By ['listing__country_latest'] Limit 100 SELECT subq_2.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_distinct_values__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_distinct_values__plan0_optimized.sql index 1653ada5bd..8c59ff210d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_distinct_values__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_distinct_values__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__country_latest',] -- Order By ['listing__country_latest'] Limit 100 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_on_join_dim__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_on_join_dim__plan0.sql index aa587bb6e7..2e785ef273 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_on_join_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_on_join_dim__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_8.booking__is_instant diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql index b471f38fed..bed21753f3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'booking__is_instant'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_join_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_join_to_scd_dimension__plan0.sql index 4dcc9d756e..335ba2dcc9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_join_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_join_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_join_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_join_to_scd_dimension__plan0_optimized.sql index 6b1bdca6cc..ff5690ae8b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_join_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_join_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_limit_rows__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_limit_rows__plan0.sql index 536aa88127..ce24e8ac07 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_limit_rows__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_limit_rows__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Order By [] Limit 1 SELECT subq_4.ds__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_limit_rows__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_limit_rows__plan0_optimized.sql index 145b088778..81ab67b440 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_limit_rows__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_limit_rows__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By [] Limit 1 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_local_dimension_using_local_entity__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_local_dimension_using_local_entity__plan0.sql index a1b5fa4800..ef64add981 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_local_dimension_using_local_entity__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_local_dimension_using_local_entity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_local_dimension_using_local_entity__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_local_dimension_using_local_entity__plan0_optimized.sql index 5d5e3407c2..b0b62597fa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_local_dimension_using_local_entity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_local_dimension_using_local_entity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint__plan0.sql index d3448240c2..a4a3aa27fe 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_25.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint__plan0_optimized.sql index aec1662154..eb3f667dbe 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_reused_measure__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_reused_measure__plan0.sql index b1fd197575..b583ac9af0 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_reused_measure__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_reused_measure__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_reused_measure__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_reused_measure__plan0_optimized.sql index a50ba5881c..3138e73622 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_reused_measure__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_reused_measure__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_single_expr_and_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_single_expr_and_alias__plan0.sql index 5586e72e02..ddfcd211b2 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_single_expr_and_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_single_expr_and_alias__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql index abf77d4144..80d1ee2c12 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql index fc67b910f3..aac0673d6c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_10.bookings AS DOUBLE) / CAST(NULLIF(subq_10.listings, 0) AS DOUBLE) AS bookings_per_listing diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql index 9137e238b0..5a7d6f467c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql index 97c917a595..4180d10ed4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql index 4d31ef04b9..b2bc49b199 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql index 9370bac234..d2d37b3869 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0_optimized.sql index 4ceb83d067..38587f10cd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_metric_time_week__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_categorical__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_categorical__plan0.sql index 6c09f964b3..9d4bb9056e 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_categorical__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_categorical__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(subq_1.listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_categorical__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_categorical__plan0_optimized.sql index a8d1afa6a8..f00d4147d4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_categorical__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_categorical__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time__plan0.sql index 4ac88db406..bc6ea679d7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time__plan0_optimized.sql index e6a861c58f..57b909fc61 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time_quarter__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time_quarter__plan0.sql index 26bfd8c1d1..4c44dbe3c0 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time_quarter__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time_quarter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time_quarter__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time_quarter__plan0_optimized.sql index 5ff0fa4feb..2d5dbc11e6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time_quarter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_min_max_only_time_quarter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_through_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_through_scd_dimension__plan0.sql index b54e3d2ac8..47217caff4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_through_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_through_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_through_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_through_scd_dimension__plan0_optimized.sql index c693b5ecd5..abeb235575 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_through_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_through_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__home_state_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_to_scd_dimension__plan0.sql index 085266baf2..261e6a42b9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_to_scd_dimension__plan0_optimized.sql index 147c41636f..27dd0f0854 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multi_hop_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__lux_listing__is_confirmed_lux', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multihop_node__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multihop_node__plan0.sql index efb88a46f6..87bc1aa433 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multihop_node__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multihop_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_11.account_id__customer_id__customer_name diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multihop_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multihop_node__plan0_optimized.sql index d59e00bb74..6f12342efb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multihop_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multihop_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs -- Pass Only Elements: ['txn_count', 'account_id__customer_id__customer_name'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multiple_metrics_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multiple_metrics_no_dimensions__plan0.sql index 175a96a8ba..8469a58d24 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multiple_metrics_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multiple_metrics_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_5.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multiple_metrics_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multiple_metrics_no_dimensions__plan0_optimized.sql index 18ff29de08..b807f9bac7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multiple_metrics_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_multiple_metrics_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_17.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_non_additive_dimension_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_non_additive_dimension_with_non_default_grain__plan0.sql index 7945f0a2c1..5c09bb0cf8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_non_additive_dimension_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_non_additive_dimension_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Compute Metrics via Expressions SELECT subq_6.total_account_balance_first_day_of_month diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql index 93ae8752df..73da294e4d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Join on MIN(ds_month) and [] grouping by None -- Pass Only Elements: ['total_account_balance_first_day_of_month',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0.sql index 8ca20862af..39b334ecf8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0_optimized.sql index abeac83bb7..3f854086ce 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Databricks/test_partitioned_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Join Standard Outputs -- Pass Only Elements: ['identity_verifications', 'user__home_state'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_common_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_common_semantic_model__plan0.sql index 017e521eaa..cd1e667b84 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_common_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_common_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_common_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_common_semantic_model__plan0_optimized.sql index e0c3b7024e..5f4e5efab5 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_common_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_common_semantic_model__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values__plan0.sql index cd3d4c172a..846fec492c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Order By ['listing__country_latest'] Limit 100 SELECT subq_2.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values__plan0_optimized.sql index 1653ada5bd..8c59ff210d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_distinct_values__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__country_latest',] -- Order By ['listing__country_latest'] Limit 100 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_on_join_dim__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_on_join_dim__plan0.sql index 88104eab74..7257ebd4d8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_on_join_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_on_join_dim__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_8.booking__is_instant diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql index b471f38fed..bed21753f3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'booking__is_instant'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_join_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_join_to_scd_dimension__plan0.sql index fc8d027636..6d07b770ca 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_join_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_join_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_join_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_join_to_scd_dimension__plan0_optimized.sql index 6b1bdca6cc..ff5690ae8b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_join_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_join_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_limit_rows__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_limit_rows__plan0.sql index 9054804d3a..1df4d24d71 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_limit_rows__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_limit_rows__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Order By [] Limit 1 SELECT subq_4.ds__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_limit_rows__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_limit_rows__plan0_optimized.sql index 145b088778..81ab67b440 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_limit_rows__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_limit_rows__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By [] Limit 1 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_local_dimension_using_local_entity__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_local_dimension_using_local_entity__plan0.sql index 81a14bcb3f..fff200836e 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_local_dimension_using_local_entity__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_local_dimension_using_local_entity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_local_dimension_using_local_entity__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_local_dimension_using_local_entity__plan0_optimized.sql index 5d5e3407c2..b0b62597fa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_local_dimension_using_local_entity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_local_dimension_using_local_entity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint__plan0.sql index d01048c17c..fe6a8f661b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_25.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint__plan0_optimized.sql index aec1662154..eb3f667dbe 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_reused_measure__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_reused_measure__plan0.sql index f58bfd9e7f..d3f89aab83 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_reused_measure__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_reused_measure__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_reused_measure__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_reused_measure__plan0_optimized.sql index a50ba5881c..3138e73622 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_reused_measure__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_reused_measure__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_single_expr_and_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_single_expr_and_alias__plan0.sql index 85ce7fc8b5..712289e936 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_single_expr_and_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_single_expr_and_alias__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql index abf77d4144..80d1ee2c12 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql index 30b8ce6b61..b612f6005f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_10.bookings AS DOUBLE) / CAST(NULLIF(subq_10.listings, 0) AS DOUBLE) AS bookings_per_listing diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql index 9137e238b0..5a7d6f467c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0.sql index 375cb5e89e..55344d164c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0_optimized.sql index 4d31ef04b9..b2bc49b199 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0.sql index 086649cf24..81cb14e253 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0_optimized.sql index 4ceb83d067..38587f10cd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_metric_time_week__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_categorical__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_categorical__plan0.sql index c8c44e9886..905633a01f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_categorical__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_categorical__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(subq_1.listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_categorical__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_categorical__plan0_optimized.sql index a8d1afa6a8..f00d4147d4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_categorical__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_categorical__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time__plan0.sql index 0675d4b77f..d9f38da7d1 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time__plan0_optimized.sql index e6a861c58f..57b909fc61 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time_quarter__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time_quarter__plan0.sql index 1f038042ce..9b584bde63 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time_quarter__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time_quarter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time_quarter__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time_quarter__plan0_optimized.sql index 5ff0fa4feb..2d5dbc11e6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time_quarter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_min_max_only_time_quarter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_through_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_through_scd_dimension__plan0.sql index 281be2468a..c6048ff12f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_through_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_through_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_through_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_through_scd_dimension__plan0_optimized.sql index c693b5ecd5..abeb235575 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_through_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_through_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__home_state_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_to_scd_dimension__plan0.sql index d118c9bb67..f147e8dcbb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_to_scd_dimension__plan0_optimized.sql index 147c41636f..27dd0f0854 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multi_hop_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__lux_listing__is_confirmed_lux', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0.sql index c896c871a6..d3f56f4d60 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_11.account_id__customer_id__customer_name diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0_optimized.sql index d59e00bb74..6f12342efb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multihop_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs -- Pass Only Elements: ['txn_count', 'account_id__customer_id__customer_name'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multiple_metrics_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multiple_metrics_no_dimensions__plan0.sql index 7eb505d9c1..071b401948 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multiple_metrics_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multiple_metrics_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_5.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multiple_metrics_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multiple_metrics_no_dimensions__plan0_optimized.sql index 18ff29de08..b807f9bac7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multiple_metrics_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_multiple_metrics_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_17.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_non_additive_dimension_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_non_additive_dimension_with_non_default_grain__plan0.sql index a4d876462a..2ac28bc901 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_non_additive_dimension_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_non_additive_dimension_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Compute Metrics via Expressions SELECT subq_6.total_account_balance_first_day_of_month diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql index 93ae8752df..73da294e4d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Join on MIN(ds_month) and [] grouping by None -- Pass Only Elements: ['total_account_balance_first_day_of_month',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0.sql index d809f2c981..51e7d344b7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0_optimized.sql index abeac83bb7..3f854086ce 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/DuckDB/test_partitioned_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Join Standard Outputs -- Pass Only Elements: ['identity_verifications', 'user__home_state'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_common_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_common_semantic_model__plan0.sql index 017e521eaa..cd1e667b84 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_common_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_common_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_common_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_common_semantic_model__plan0_optimized.sql index e0c3b7024e..5f4e5efab5 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_common_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_common_semantic_model__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_distinct_values__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_distinct_values__plan0.sql index cd3d4c172a..846fec492c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_distinct_values__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_distinct_values__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Order By ['listing__country_latest'] Limit 100 SELECT subq_2.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_distinct_values__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_distinct_values__plan0_optimized.sql index 1653ada5bd..8c59ff210d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_distinct_values__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_distinct_values__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__country_latest',] -- Order By ['listing__country_latest'] Limit 100 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_on_join_dim__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_on_join_dim__plan0.sql index 88104eab74..7257ebd4d8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_on_join_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_on_join_dim__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_8.booking__is_instant diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql index b471f38fed..bed21753f3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'booking__is_instant'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_join_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_join_to_scd_dimension__plan0.sql index fc8d027636..6d07b770ca 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_join_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_join_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_join_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_join_to_scd_dimension__plan0_optimized.sql index 6b1bdca6cc..ff5690ae8b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_join_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_join_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_limit_rows__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_limit_rows__plan0.sql index 9054804d3a..1df4d24d71 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_limit_rows__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_limit_rows__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Order By [] Limit 1 SELECT subq_4.ds__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_limit_rows__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_limit_rows__plan0_optimized.sql index 145b088778..81ab67b440 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_limit_rows__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_limit_rows__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By [] Limit 1 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_local_dimension_using_local_entity__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_local_dimension_using_local_entity__plan0.sql index 81a14bcb3f..fff200836e 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_local_dimension_using_local_entity__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_local_dimension_using_local_entity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_local_dimension_using_local_entity__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_local_dimension_using_local_entity__plan0_optimized.sql index 5d5e3407c2..b0b62597fa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_local_dimension_using_local_entity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_local_dimension_using_local_entity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint__plan0.sql index d01048c17c..fe6a8f661b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_25.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint__plan0_optimized.sql index aec1662154..eb3f667dbe 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_reused_measure__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_reused_measure__plan0.sql index 02e5a8a4bd..44a9c6fd4d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_reused_measure__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_reused_measure__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_reused_measure__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_reused_measure__plan0_optimized.sql index aeff29ca51..e43c925d8d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_reused_measure__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_reused_measure__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_single_expr_and_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_single_expr_and_alias__plan0.sql index 85ce7fc8b5..712289e936 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_single_expr_and_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_single_expr_and_alias__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql index abf77d4144..80d1ee2c12 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql index 8683a8d58c..80557e5c06 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_10.bookings AS DOUBLE PRECISION) / CAST(NULLIF(subq_10.listings, 0) AS DOUBLE PRECISION) AS bookings_per_listing diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql index 6248802f15..fcb846d90d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql index 375cb5e89e..55344d164c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql index 4d31ef04b9..b2bc49b199 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql index 086649cf24..81cb14e253 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0_optimized.sql index 4ceb83d067..38587f10cd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_metric_time_week__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_categorical__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_categorical__plan0.sql index c8c44e9886..905633a01f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_categorical__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_categorical__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(subq_1.listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_categorical__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_categorical__plan0_optimized.sql index a8d1afa6a8..f00d4147d4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_categorical__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_categorical__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time__plan0.sql index 0675d4b77f..d9f38da7d1 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time__plan0_optimized.sql index e6a861c58f..57b909fc61 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time_quarter__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time_quarter__plan0.sql index 1f038042ce..9b584bde63 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time_quarter__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time_quarter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time_quarter__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time_quarter__plan0_optimized.sql index 5ff0fa4feb..2d5dbc11e6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time_quarter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_min_max_only_time_quarter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_through_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_through_scd_dimension__plan0.sql index 281be2468a..c6048ff12f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_through_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_through_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_through_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_through_scd_dimension__plan0_optimized.sql index c693b5ecd5..abeb235575 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_through_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_through_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__home_state_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_to_scd_dimension__plan0.sql index d118c9bb67..f147e8dcbb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_to_scd_dimension__plan0_optimized.sql index 147c41636f..27dd0f0854 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multi_hop_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__lux_listing__is_confirmed_lux', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multihop_node__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multihop_node__plan0.sql index c896c871a6..d3f56f4d60 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multihop_node__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multihop_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_11.account_id__customer_id__customer_name diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multihop_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multihop_node__plan0_optimized.sql index d59e00bb74..6f12342efb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multihop_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multihop_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs -- Pass Only Elements: ['txn_count', 'account_id__customer_id__customer_name'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multiple_metrics_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multiple_metrics_no_dimensions__plan0.sql index 7eb505d9c1..071b401948 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multiple_metrics_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multiple_metrics_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_5.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multiple_metrics_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multiple_metrics_no_dimensions__plan0_optimized.sql index 18ff29de08..b807f9bac7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multiple_metrics_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_multiple_metrics_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_17.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_non_additive_dimension_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_non_additive_dimension_with_non_default_grain__plan0.sql index a4d876462a..2ac28bc901 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_non_additive_dimension_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_non_additive_dimension_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Compute Metrics via Expressions SELECT subq_6.total_account_balance_first_day_of_month diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql index 93ae8752df..73da294e4d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Join on MIN(ds_month) and [] grouping by None -- Pass Only Elements: ['total_account_balance_first_day_of_month',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0.sql index d809f2c981..51e7d344b7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0_optimized.sql index abeac83bb7..3f854086ce 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Postgres/test_partitioned_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Join Standard Outputs -- Pass Only Elements: ['identity_verifications', 'user__home_state'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_common_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_common_semantic_model__plan0.sql index 184027d01e..952b5a0d2d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_common_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_common_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_common_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_common_semantic_model__plan0_optimized.sql index e0c3b7024e..5f4e5efab5 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_common_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_common_semantic_model__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_distinct_values__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_distinct_values__plan0.sql index cf9f152551..7744209874 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_distinct_values__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_distinct_values__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Order By ['listing__country_latest'] Limit 100 SELECT subq_2.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_distinct_values__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_distinct_values__plan0_optimized.sql index 1653ada5bd..8c59ff210d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_distinct_values__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_distinct_values__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__country_latest',] -- Order By ['listing__country_latest'] Limit 100 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_on_join_dim__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_on_join_dim__plan0.sql index 8503dd36b4..74cf409acb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_on_join_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_on_join_dim__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_8.booking__is_instant diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql index b471f38fed..bed21753f3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'booking__is_instant'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_join_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_join_to_scd_dimension__plan0.sql index 6f43d560af..f6fcdcdc1c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_join_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_join_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_join_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_join_to_scd_dimension__plan0_optimized.sql index 6b1bdca6cc..ff5690ae8b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_join_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_join_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_limit_rows__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_limit_rows__plan0.sql index 61b8e56d91..3c953fd5cf 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_limit_rows__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_limit_rows__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Order By [] Limit 1 SELECT subq_4.ds__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_limit_rows__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_limit_rows__plan0_optimized.sql index 145b088778..81ab67b440 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_limit_rows__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_limit_rows__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By [] Limit 1 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_local_dimension_using_local_entity__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_local_dimension_using_local_entity__plan0.sql index d4aa29a1fa..2b42645fd6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_local_dimension_using_local_entity__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_local_dimension_using_local_entity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_local_dimension_using_local_entity__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_local_dimension_using_local_entity__plan0_optimized.sql index 5d5e3407c2..b0b62597fa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_local_dimension_using_local_entity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_local_dimension_using_local_entity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint__plan0.sql index 985f295abd..7fc4045994 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_25.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint__plan0_optimized.sql index aec1662154..eb3f667dbe 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_reused_measure__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_reused_measure__plan0.sql index 5a8ae33b2e..728939b575 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_reused_measure__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_reused_measure__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_reused_measure__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_reused_measure__plan0_optimized.sql index aeff29ca51..e43c925d8d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_reused_measure__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_reused_measure__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_single_expr_and_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_single_expr_and_alias__plan0.sql index a92913a520..2047803801 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_single_expr_and_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_single_expr_and_alias__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql index abf77d4144..80d1ee2c12 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql index cac18b2a15..6e457038af 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_10.bookings AS DOUBLE PRECISION) / CAST(NULLIF(subq_10.listings, 0) AS DOUBLE PRECISION) AS bookings_per_listing diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql index 6248802f15..fcb846d90d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql index e475d6cd85..3c222453df 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql index 4d31ef04b9..b2bc49b199 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql index b762f6151a..323f4433aa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0_optimized.sql index 4ceb83d067..38587f10cd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_metric_time_week__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_categorical__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_categorical__plan0.sql index 979511b896..fc573f215e 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_categorical__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_categorical__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(subq_1.listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_categorical__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_categorical__plan0_optimized.sql index a8d1afa6a8..f00d4147d4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_categorical__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_categorical__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time__plan0.sql index 19569e03f1..ca09f02238 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time__plan0_optimized.sql index e6a861c58f..57b909fc61 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time_quarter__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time_quarter__plan0.sql index a359ddc666..3a14ce0c1d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time_quarter__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time_quarter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time_quarter__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time_quarter__plan0_optimized.sql index 5ff0fa4feb..2d5dbc11e6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time_quarter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_min_max_only_time_quarter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_through_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_through_scd_dimension__plan0.sql index efd5344173..83bcd58222 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_through_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_through_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_through_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_through_scd_dimension__plan0_optimized.sql index c693b5ecd5..abeb235575 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_through_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_through_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__home_state_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_to_scd_dimension__plan0.sql index 68465c9d2d..e2a2221df3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_to_scd_dimension__plan0_optimized.sql index 147c41636f..27dd0f0854 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multi_hop_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__lux_listing__is_confirmed_lux', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multihop_node__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multihop_node__plan0.sql index d31fad05e4..399c7f18aa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multihop_node__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multihop_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_11.account_id__customer_id__customer_name diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multihop_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multihop_node__plan0_optimized.sql index d59e00bb74..6f12342efb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multihop_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multihop_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs -- Pass Only Elements: ['txn_count', 'account_id__customer_id__customer_name'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multiple_metrics_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multiple_metrics_no_dimensions__plan0.sql index ae6fc35582..5200294066 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multiple_metrics_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multiple_metrics_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_5.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multiple_metrics_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multiple_metrics_no_dimensions__plan0_optimized.sql index 18ff29de08..b807f9bac7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multiple_metrics_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_multiple_metrics_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_17.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_non_additive_dimension_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_non_additive_dimension_with_non_default_grain__plan0.sql index 46225cb9fd..25167fae73 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_non_additive_dimension_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_non_additive_dimension_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Compute Metrics via Expressions SELECT subq_6.total_account_balance_first_day_of_month diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql index 93ae8752df..73da294e4d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Join on MIN(ds_month) and [] grouping by None -- Pass Only Elements: ['total_account_balance_first_day_of_month',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0.sql index f27dc01000..5fd66fd525 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0_optimized.sql index abeac83bb7..3f854086ce 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Redshift/test_partitioned_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Join Standard Outputs -- Pass Only Elements: ['identity_verifications', 'user__home_state'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_common_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_common_semantic_model__plan0.sql index caa408d97c..602d4c01c1 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_common_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_common_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_common_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_common_semantic_model__plan0_optimized.sql index e0c3b7024e..5f4e5efab5 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_common_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_common_semantic_model__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values__plan0.sql index 0a82b5e771..da75f4e90a 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Order By ['listing__country_latest'] Limit 100 SELECT subq_2.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values__plan0_optimized.sql index 1653ada5bd..8c59ff210d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_distinct_values__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__country_latest',] -- Order By ['listing__country_latest'] Limit 100 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_on_join_dim__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_on_join_dim__plan0.sql index f59931caab..591d6933db 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_on_join_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_on_join_dim__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_8.booking__is_instant diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql index b471f38fed..bed21753f3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'booking__is_instant'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_join_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_join_to_scd_dimension__plan0.sql index 68c1d64b27..33b5d4a408 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_join_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_join_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_join_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_join_to_scd_dimension__plan0_optimized.sql index 6b1bdca6cc..ff5690ae8b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_join_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_join_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_limit_rows__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_limit_rows__plan0.sql index 030a3e95f1..a8992e7532 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_limit_rows__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_limit_rows__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Order By [] Limit 1 SELECT subq_4.ds__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_limit_rows__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_limit_rows__plan0_optimized.sql index 145b088778..81ab67b440 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_limit_rows__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_limit_rows__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By [] Limit 1 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_local_dimension_using_local_entity__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_local_dimension_using_local_entity__plan0.sql index fdcf60a4dd..3624a8a347 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_local_dimension_using_local_entity__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_local_dimension_using_local_entity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_local_dimension_using_local_entity__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_local_dimension_using_local_entity__plan0_optimized.sql index 5d5e3407c2..b0b62597fa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_local_dimension_using_local_entity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_local_dimension_using_local_entity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint__plan0.sql index b00468f676..641ebf8efc 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_25.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint__plan0_optimized.sql index aec1662154..eb3f667dbe 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_reused_measure__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_reused_measure__plan0.sql index 5677da6ab7..8fdf830ccc 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_reused_measure__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_reused_measure__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_reused_measure__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_reused_measure__plan0_optimized.sql index a50ba5881c..3138e73622 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_reused_measure__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_reused_measure__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_single_expr_and_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_single_expr_and_alias__plan0.sql index 7accc463c8..eccc138f01 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_single_expr_and_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_single_expr_and_alias__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql index abf77d4144..80d1ee2c12 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql index 848abca0b5..0acb72c8eb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_10.bookings AS DOUBLE) / CAST(NULLIF(subq_10.listings, 0) AS DOUBLE) AS bookings_per_listing diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql index 9137e238b0..5a7d6f467c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql index b96ac5b039..afa441b07b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql index 4d31ef04b9..b2bc49b199 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql index 8ec903e380..4f1e2fb921 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0_optimized.sql index 4ceb83d067..38587f10cd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_metric_time_week__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_categorical__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_categorical__plan0.sql index 7c3e778ec5..ab48c92a42 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_categorical__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_categorical__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(subq_1.listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_categorical__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_categorical__plan0_optimized.sql index a8d1afa6a8..f00d4147d4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_categorical__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_categorical__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time__plan0.sql index 3eac93eef4..3be7bbe79b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time__plan0_optimized.sql index e6a861c58f..57b909fc61 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time_quarter__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time_quarter__plan0.sql index 9e0ddf7c7a..42980d8e6f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time_quarter__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time_quarter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time_quarter__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time_quarter__plan0_optimized.sql index 5ff0fa4feb..2d5dbc11e6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time_quarter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_min_max_only_time_quarter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_through_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_through_scd_dimension__plan0.sql index ab38eb8f26..2cf80c6562 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_through_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_through_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_through_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_through_scd_dimension__plan0_optimized.sql index c693b5ecd5..abeb235575 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_through_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_through_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__home_state_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_to_scd_dimension__plan0.sql index 3556646016..4036bcd47a 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_to_scd_dimension__plan0_optimized.sql index 147c41636f..27dd0f0854 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multi_hop_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__lux_listing__is_confirmed_lux', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0.sql index 4a970db926..6b24dbf27d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_11.account_id__customer_id__customer_name diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0_optimized.sql index d59e00bb74..6f12342efb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multihop_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs -- Pass Only Elements: ['txn_count', 'account_id__customer_id__customer_name'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multiple_metrics_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multiple_metrics_no_dimensions__plan0.sql index c91380ec59..36d6bf9d2b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multiple_metrics_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multiple_metrics_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_5.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multiple_metrics_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multiple_metrics_no_dimensions__plan0_optimized.sql index 18ff29de08..b807f9bac7 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multiple_metrics_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_multiple_metrics_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_17.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_non_additive_dimension_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_non_additive_dimension_with_non_default_grain__plan0.sql index 8dbc4b8c6e..af55a3b043 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_non_additive_dimension_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_non_additive_dimension_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Compute Metrics via Expressions SELECT subq_6.total_account_balance_first_day_of_month diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql index 93ae8752df..73da294e4d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Join on MIN(ds_month) and [] grouping by None -- Pass Only Elements: ['total_account_balance_first_day_of_month',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0.sql index 0912a2ed57..411e7b12af 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0_optimized.sql index abeac83bb7..3f854086ce 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Snowflake/test_partitioned_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Join Standard Outputs -- Pass Only Elements: ['identity_verifications', 'user__home_state'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_common_semantic_model__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_common_semantic_model__plan0.sql index 732dacefb7..0b9cf3b0f5 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_common_semantic_model__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_common_semantic_model__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_common_semantic_model__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_common_semantic_model__plan0_optimized.sql index e0c3b7024e..5f4e5efab5 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_common_semantic_model__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_common_semantic_model__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_common_semantic_model +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_distinct_values__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_distinct_values__plan0.sql index 955c17a477..b8644af8cd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_distinct_values__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_distinct_values__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Order By ['listing__country_latest'] Limit 100 SELECT subq_2.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_distinct_values__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_distinct_values__plan0_optimized.sql index 1653ada5bd..8c59ff210d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_distinct_values__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_distinct_values__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_values +test_filename: test_query_rendering.py +docstring: + Tests a plan to get distinct values for a dimension. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['listing__country_latest',] -- Order By ['listing__country_latest'] Limit 100 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_on_join_dim__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_on_join_dim__plan0.sql index 68939aa2a7..84ebd5c687 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_on_join_dim__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_on_join_dim__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_8.booking__is_instant diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql index b471f38fed..bed21753f3 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_filter_with_where_constraint_on_join_dim__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_filter_with_where_constraint_on_join_dim +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'booking__is_instant'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_join_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_join_to_scd_dimension__plan0.sql index 1b6bc2717d..e89b566290 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_join_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_join_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_join_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_join_to_scd_dimension__plan0_optimized.sql index 6b1bdca6cc..ff5690ae8b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_join_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_join_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension with a validity window inside a measure constraint. +--- -- Constrain Output with WHERE -- Pass Only Elements: ['bookings', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_limit_rows__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_limit_rows__plan0.sql index 5e980bc455..731b397e9e 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_limit_rows__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_limit_rows__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Order By [] Limit 1 SELECT subq_4.ds__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_limit_rows__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_limit_rows__plan0_optimized.sql index 145b088778..81ab67b440 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_limit_rows__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_limit_rows__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_limit_rows +test_filename: test_query_rendering.py +docstring: + Tests a plan with a limit to the number of rows returned. +--- -- Aggregate Measures -- Compute Metrics via Expressions -- Order By [] Limit 1 diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_local_dimension_using_local_entity__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_local_dimension_using_local_entity__plan0.sql index 30f73151e4..9fe23e837f 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_local_dimension_using_local_entity__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_local_dimension_using_local_entity__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_3.listing__country_latest diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_local_dimension_using_local_entity__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_local_dimension_using_local_entity__plan0_optimized.sql index 5d5e3407c2..b0b62597fa 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_local_dimension_using_local_entity__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_local_dimension_using_local_entity__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_local_dimension_using_local_entity +test_filename: test_query_rendering.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint__plan0.sql index 7e2198b152..7e764993a6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_25.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint__plan0_optimized.sql index aec1662154..eb3f667dbe 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_reused_measure__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_reused_measure__plan0.sql index 6774f913cc..4a11b45b5a 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_reused_measure__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_reused_measure__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_11.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_reused_measure__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_reused_measure__plan0_optimized.sql index a50ba5881c..3138e73622 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_reused_measure__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_reused_measure__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_reused_measure +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_single_expr_and_alias__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_single_expr_and_alias__plan0.sql index 6218df0f49..be54cfe168 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_single_expr_and_alias__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_single_expr_and_alias__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_5.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql index abf77d4144..80d1ee2c12 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_measure_constraint_with_single_expr_and_alias__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_measure_constraint_with_single_expr_and_alias +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql index b45df28e63..0b06f1c6e9 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Compute Metrics via Expressions SELECT CAST(subq_10.bookings AS DOUBLE) / CAST(NULLIF(subq_10.listings, 0) AS DOUBLE) AS bookings_per_listing diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql index 9137e238b0..5a7d6f467c 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_metric_with_measures_from_multiple_sources_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_metric_with_measures_from_multiple_sources_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql index 70b6a86c5a..d2f26f7929 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql index 4d31ef04b9..b2bc49b199 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time. +--- -- Calculate min and max SELECT MIN(metric_time__day) AS metric_time__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql index d05091c102..f1d74a0872 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_2.metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0_optimized.sql index 4ceb83d067..38587f10cd 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_metric_time_week__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_metric_time_week +test_filename: test_query_rendering.py +docstring: + Tests a plan to get the min & max distinct values of metric_time with non-default granularity. +--- -- Calculate min and max SELECT MIN(metric_time__week) AS metric_time__week__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_categorical__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_categorical__plan0.sql index 6c9fa9074c..760b044973 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_categorical__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_categorical__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(subq_1.listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_categorical__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_categorical__plan0_optimized.sql index a8d1afa6a8..f00d4147d4 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_categorical__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_categorical__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_categorical +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a categorical dimension. +--- -- Calculate min and max SELECT MIN(listing__country_latest) AS listing__country_latest__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time__plan0.sql index 56908c76e2..19ffd7bfe8 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time__plan0_optimized.sql index e6a861c58f..57b909fc61 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension. +--- -- Calculate min and max SELECT MIN(booking__paid_at__day) AS booking__paid_at__day__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time_quarter__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time_quarter__plan0.sql index b957d25a10..dc4880b685 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time_quarter__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time_quarter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(subq_1.booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time_quarter__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time_quarter__plan0_optimized.sql index 5ff0fa4feb..2d5dbc11e6 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time_quarter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_min_max_only_time_quarter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_min_max_only_time_quarter +test_filename: test_query_rendering.py +docstring: + Tests a min max only query with a time dimension and non-default granularity. +--- -- Calculate min and max SELECT MIN(booking__paid_at__quarter) AS booking__paid_at__quarter__min diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_through_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_through_scd_dimension__plan0.sql index 6e26e4a201..9c7d84fb47 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_through_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_through_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_through_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_through_scd_dimension__plan0_optimized.sql index c693b5ecd5..abeb235575 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_through_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_through_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_through_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using a dimension that is reached through an SCD table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__user__home_state_latest', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_to_scd_dimension__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_to_scd_dimension__plan0.sql index 2980d12266..6449179a4b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_to_scd_dimension__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_to_scd_dimension__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Compute Metrics via Expressions SELECT subq_9.metric_time__day diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_to_scd_dimension__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_to_scd_dimension__plan0_optimized.sql index 147c41636f..27dd0f0854 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_to_scd_dimension__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multi_hop_to_scd_dimension__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multi_hop_to_scd_dimension +test_filename: test_query_rendering.py +docstring: + Tests conversion of a plan using an SCD dimension that is reached through another table. +--- -- Join Standard Outputs -- Pass Only Elements: ['bookings', 'listing__lux_listing__is_confirmed_lux', 'metric_time__day'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multihop_node__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multihop_node__plan0.sql index a192266a70..5fe4f7b660 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multihop_node__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multihop_node__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Compute Metrics via Expressions SELECT subq_11.account_id__customer_id__customer_name diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multihop_node__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multihop_node__plan0_optimized.sql index d59e00bb74..6f12342efb 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multihop_node__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multihop_node__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_multihop_node +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan to a SQL query plan where there is a join between 1 measure and 2 dimensions. +--- -- Join Standard Outputs -- Pass Only Elements: ['txn_count', 'account_id__customer_id__customer_name'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multiple_metrics_no_dimensions__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multiple_metrics_no_dimensions__plan0.sql index 7b77ae03e2..d6d72e6642 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multiple_metrics_no_dimensions__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multiple_metrics_no_dimensions__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_5.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multiple_metrics_no_dimensions__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multiple_metrics_no_dimensions__plan0_optimized.sql index e393d122a8..959a01498b 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multiple_metrics_no_dimensions__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_multiple_metrics_no_dimensions__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_multiple_metrics_no_dimensions +test_filename: test_query_rendering.py +--- -- Combine Aggregated Outputs SELECT MAX(subq_17.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_non_additive_dimension_with_non_default_grain__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_non_additive_dimension_with_non_default_grain__plan0.sql index 0f2ad78f0f..79d108954d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_non_additive_dimension_with_non_default_grain__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_non_additive_dimension_with_non_default_grain__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Compute Metrics via Expressions SELECT subq_6.total_account_balance_first_day_of_month diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql index 93ae8752df..73da294e4d 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_non_additive_dimension_with_non_default_grain__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_non_additive_dimension_with_non_default_grain +test_filename: test_query_rendering.py +docstring: + Tests querying a metric with a non-additive agg_time_dimension that has non-default granularity. +--- -- Join on MIN(ds_month) and [] grouping by None -- Pass Only Elements: ['total_account_balance_first_day_of_month',] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0.sql index b162d7ed62..25d4b44c57 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Compute Metrics via Expressions SELECT subq_7.user__home_state diff --git a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0_optimized.sql b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0_optimized.sql index abeac83bb7..3f854086ce 100644 --- a/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_query_rendering.py/SqlQueryPlan/Trino/test_partitioned_join__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_partitioned_join +test_filename: test_query_rendering.py +docstring: + Tests converting a dataflow plan where there's a join on a partitioned dimension. +--- -- Join Standard Outputs -- Pass Only Elements: ['identity_verifications', 'user__home_state'] -- Aggregate Measures diff --git a/tests_metricflow/snapshots/test_render_cte.py/SqlQueryPlan/test_render_cte__plan_0.sql b/tests_metricflow/snapshots/test_render_cte.py/SqlQueryPlan/test_render_cte__plan_0.sql index 47e4387608..ba51c1bd41 100644 --- a/tests_metricflow/snapshots/test_render_cte.py/SqlQueryPlan/test_render_cte__plan_0.sql +++ b/tests_metricflow/snapshots/test_render_cte.py/SqlQueryPlan/test_render_cte__plan_0.sql @@ -1,3 +1,6 @@ +test_name: test_render_cte +test_filename: test_render_cte.py +--- -- cte_test WITH cte_0 AS ( -- cte_select_0 diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration__query.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration__query.sql index e69a2f285e..b1a350d2d5 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration__query.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/BigQuery/test_id_enumeration__query.sql @@ -1,3 +1,6 @@ +test_name: test_id_enumeration +test_filename: test_rendered_query.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/BigQuery/test_render_query__query0.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/BigQuery/test_render_query__query0.sql index a015e030fa..2d98619738 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/BigQuery/test_render_query__query0.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/BigQuery/test_render_query__query0.sql @@ -1,3 +1,6 @@ +test_name: test_render_query +test_filename: test_rendered_query.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration__query.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration__query.sql index afe59d05cf..6f36fac991 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration__query.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Databricks/test_id_enumeration__query.sql @@ -1,3 +1,6 @@ +test_name: test_id_enumeration +test_filename: test_rendered_query.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Databricks/test_render_query__query0.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Databricks/test_render_query__query0.sql index 5cf9ed8596..70d72ba751 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Databricks/test_render_query__query0.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Databricks/test_render_query__query0.sql @@ -1,3 +1,6 @@ +test_name: test_render_query +test_filename: test_rendered_query.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration__query.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration__query.sql index afe59d05cf..6f36fac991 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration__query.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/DuckDB/test_id_enumeration__query.sql @@ -1,3 +1,6 @@ +test_name: test_id_enumeration +test_filename: test_rendered_query.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/DuckDB/test_render_query__query0.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/DuckDB/test_render_query__query0.sql index 5cf9ed8596..70d72ba751 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/DuckDB/test_render_query__query0.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/DuckDB/test_render_query__query0.sql @@ -1,3 +1,6 @@ +test_name: test_render_query +test_filename: test_rendered_query.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration__query.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration__query.sql index afe59d05cf..6f36fac991 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration__query.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Postgres/test_id_enumeration__query.sql @@ -1,3 +1,6 @@ +test_name: test_id_enumeration +test_filename: test_rendered_query.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Postgres/test_render_query__query0.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Postgres/test_render_query__query0.sql index 5cf9ed8596..70d72ba751 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Postgres/test_render_query__query0.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Postgres/test_render_query__query0.sql @@ -1,3 +1,6 @@ +test_name: test_render_query +test_filename: test_rendered_query.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration__query.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration__query.sql index afe59d05cf..6f36fac991 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration__query.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Redshift/test_id_enumeration__query.sql @@ -1,3 +1,6 @@ +test_name: test_id_enumeration +test_filename: test_rendered_query.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Redshift/test_render_query__query0.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Redshift/test_render_query__query0.sql index 5cf9ed8596..70d72ba751 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Redshift/test_render_query__query0.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Redshift/test_render_query__query0.sql @@ -1,3 +1,6 @@ +test_name: test_render_query +test_filename: test_rendered_query.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration__query.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration__query.sql index afe59d05cf..6f36fac991 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration__query.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Snowflake/test_id_enumeration__query.sql @@ -1,3 +1,6 @@ +test_name: test_id_enumeration +test_filename: test_rendered_query.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Snowflake/test_render_query__query0.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Snowflake/test_render_query__query0.sql index 5cf9ed8596..70d72ba751 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Snowflake/test_render_query__query0.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Snowflake/test_render_query__query0.sql @@ -1,3 +1,6 @@ +test_name: test_render_query +test_filename: test_rendered_query.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration__query.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration__query.sql index afe59d05cf..6f36fac991 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration__query.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Trino/test_id_enumeration__query.sql @@ -1,3 +1,6 @@ +test_name: test_id_enumeration +test_filename: test_rendered_query.py +--- -- Combine Aggregated Outputs SELECT COALESCE(subq_4.metric_time__day, subq_9.metric_time__day) AS metric_time__day diff --git a/tests_metricflow/snapshots/test_rendered_query.py/str/Trino/test_render_query__query0.sql b/tests_metricflow/snapshots/test_rendered_query.py/str/Trino/test_render_query__query0.sql index 5cf9ed8596..70d72ba751 100644 --- a/tests_metricflow/snapshots/test_rendered_query.py/str/Trino/test_render_query__query0.sql +++ b/tests_metricflow/snapshots/test_rendered_query.py/str/Trino/test_render_query__query0.sql @@ -1,3 +1,6 @@ +test_name: test_render_query +test_filename: test_rendered_query.py +--- -- Aggregate Measures -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_colliding_alias__after_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_colliding_alias__after_reducing.sql index 3e513994cb..4c3dcd28b3 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_colliding_alias__after_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_colliding_alias__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_colliding_alias +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where reducing occurs on a JOIN. +--- -- query SELECT SUM(bookings_src.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_colliding_alias__before_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_colliding_alias__before_reducing.sql index 3e513994cb..4c3dcd28b3 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_colliding_alias__before_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_colliding_alias__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_colliding_alias +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where reducing occurs on a JOIN. +--- -- query SELECT SUM(bookings_src.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_all_join_sources__after_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_all_join_sources__after_reducing.sql index 49805f0bb0..d332ad8392 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_all_join_sources__after_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_all_join_sources__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reduce_all_join_sources +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where reducing occurs all all sources on a JOIN. +--- -- query SELECT SUM(fct_bookings_src.booking) AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_all_join_sources__before_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_all_join_sources__before_reducing.sql index 5ecedb7991..e09dd269b7 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_all_join_sources__before_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_all_join_sources__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reduce_all_join_sources +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where reducing occurs all all sources on a JOIN. +--- -- query SELECT SUM(bookings_src.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_join__after_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_join__after_reducing.sql index 28afc19738..eb81dbc0fb 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_join__after_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_join__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reduce_join +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where reducing occurs on a JOIN. +--- -- query SELECT SUM(bookings_src.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_join__before_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_join__before_reducing.sql index 2ac7d7d58c..0276eb6a76 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_join__before_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_join__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reduce_join +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where reducing occurs on a JOIN. +--- -- query SELECT SUM(bookings_src.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__after_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__after_reducing.sql index 8e29715f82..290e4842e0 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__after_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reduce_sub_query +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where an outer query should be reduced into its inner query with merged LIMIT expressions. +--- -- src1 -- src2 -- src3 diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__before_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__before_reducing.sql index 87c6f80255..917630b798 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__before_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reduce_sub_query +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where an outer query should be reduced into its inner query with merged LIMIT expressions. +--- -- src3 SELECT SUM(src2.bookings) AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_left_node_statement__after_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_left_node_statement__after_reducing.sql index 1072993076..0d886ba254 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_left_node_statement__after_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_left_node_statement__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reducing_join_left_node_statement +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where a join query should not reduced an aggregate. +--- -- query SELECT src2.bookings AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_left_node_statement__before_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_left_node_statement__before_reducing.sql index 87695385bd..cf8d64352f 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_left_node_statement__before_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_left_node_statement__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reducing_join_left_node_statement +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where a join query should not reduced an aggregate. +--- -- query SELECT src2.bookings AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_statement__after_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_statement__after_reducing.sql index 464a3b7dd0..a1377b8894 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_statement__after_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_statement__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reducing_join_statement +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where a join query should not reduced an aggregate. +--- -- query SELECT src2.bookings AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_statement__before_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_statement__before_reducing.sql index e184011b3b..520867500c 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_statement__before_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_reducing_join_statement__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reducing_join_statement +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests a case where a join query should not reduced an aggregate. +--- -- query SELECT src2.bookings AS bookings diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_rewriting_distinct_select_node_is_not_reduced__after_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_rewriting_distinct_select_node_is_not_reduced__after_reducing.sql index 9acdadd458..546626d668 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_rewriting_distinct_select_node_is_not_reduced__after_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_rewriting_distinct_select_node_is_not_reduced__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_rewriting_distinct_select_node_is_not_reduced +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests to ensure distinct select node doesn't get overwritten. +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_rewriting_distinct_select_node_is_not_reduced__before_reducing.sql b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_rewriting_distinct_select_node_is_not_reduced__before_reducing.sql index 9acdadd458..546626d668 100644 --- a/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_rewriting_distinct_select_node_is_not_reduced__before_reducing.sql +++ b/tests_metricflow/snapshots/test_rewriting_sub_query_reducer.py/SqlQueryPlan/test_rewriting_distinct_select_node_is_not_reduced__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_rewriting_distinct_select_node_is_not_reduced +test_filename: test_rewriting_sub_query_reducer.py +docstring: + Tests to ensure distinct select node doesn't get overwritten. +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml index 67e5db8a0e..21b4403add 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfp_0.xml @@ -1,3 +1,10 @@ +test_name: test_2_metrics_from_1_semantic_model +test_filename: test_source_scan_optimizer.py +docstring: + Tests that optimizing the plan for 2 metrics from 2 measure semantic models results in half the number of scans. + + Each metric is computed from the same measure semantic model and the dimension semantic model. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfpo_0.xml index b821e05b27..9d9bbe892c 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_1_semantic_model__dfpo_0.xml @@ -1,3 +1,10 @@ +test_name: test_2_metrics_from_1_semantic_model +test_filename: test_source_scan_optimizer.py +docstring: + Tests that optimizing the plan for 2 metrics from 2 measure semantic models results in half the number of scans. + + Each metric is computed from the same measure semantic model and the dimension semantic model. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml index 432599d4a8..0f900ca149 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_2_metrics_from_2_semantic_models +test_filename: test_source_scan_optimizer.py +docstring: + Tests that 2 metrics from the 2 semantic models results in 2 scans. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfpo_0.xml index edabef3987..045472d659 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_metrics_from_2_semantic_models__dfpo_0.xml @@ -1,3 +1,8 @@ +test_name: test_2_metrics_from_2_semantic_models +test_filename: test_source_scan_optimizer.py +docstring: + Tests that 2 metrics from the 2 semantic models results in 2 scans. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml index dc62d027e6..0236c18c7c 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_2_ratio_metrics_from_1_semantic_model +test_filename: test_source_scan_optimizer.py +docstring: + Tests that 2 ratio metrics with measures from a 1 semantic model result in 1 scan. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml index 013fd42bb7..61175bfdb5 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_2_ratio_metrics_from_1_semantic_model__dfpo_0.xml @@ -1,3 +1,8 @@ +test_name: test_2_ratio_metrics_from_1_semantic_model +test_filename: test_source_scan_optimizer.py +docstring: + Tests that 2 ratio metrics with measures from a 1 semantic model result in 1 scan. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml index e5cd88f8a4..878d5d3761 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_3_metrics_from_2_semantic_models +test_filename: test_source_scan_optimizer.py +docstring: + Tests that 3 metrics from the 2 semantic models results in 2 scans. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfpo_0.xml index 1c1297dfff..84d1ad2448 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_3_metrics_from_2_semantic_models__dfpo_0.xml @@ -1,3 +1,8 @@ +test_name: test_3_metrics_from_2_semantic_models +test_filename: test_source_scan_optimizer.py +docstring: + Tests that 3 metrics from the 2 semantic models results in 2 scans. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml index 238803c349..b7ef849766 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfp_0.xml @@ -1,3 +1,11 @@ +test_name: test_constrained_metric_not_combined +test_filename: test_source_scan_optimizer.py +docstring: + Tests that 2 metrics from the same semantic model but where 1 is constrained results in 2 scans. + + If there is a constraint for a metric, it needs to be handled in a separate query because the constraint applies to + all rows. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml index 3d35474a45..06f2e89f3b 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_constrained_metric_not_combined__dfpo_0.xml @@ -1,3 +1,11 @@ +test_name: test_constrained_metric_not_combined +test_filename: test_source_scan_optimizer.py +docstring: + Tests that 2 metrics from the same semantic model but where 1 is constrained results in 2 scans. + + If there is a constraint for a metric, it needs to be handled in a separate query because the constraint applies to + all rows. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml index f87c5f1f3e..c4abe8761c 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfp_0.xml @@ -1,3 +1,10 @@ +test_name: test_derived_metric +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of a query that use a derived metrics with measures coming from a single semantic model. + + non_referred_bookings_pct is a derived metric that uses measures [bookings, referred_bookings] +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfpo_0.xml index c473b8dc01..23f453397c 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric__dfpo_0.xml @@ -1,3 +1,10 @@ +test_name: test_derived_metric +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of a query that use a derived metrics with measures coming from a single semantic model. + + non_referred_bookings_pct is a derived metric that uses measures [bookings, referred_bookings] +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_combined__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_combined__dfp_0.xml index 145af4b7bc..35ce3c5db0 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_combined__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_combined__dfp_0.xml @@ -1,3 +1,11 @@ +test_name: test_derived_metric_same_alias_components_combined +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of querying 2 metrics which give the same alias to the same thing in their components. + + In this case we DO combine source nodes, since the components are the same exact thing so we don't need to + scan over it twice +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_combined__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_combined__dfpo_0.xml index fff218b335..2363e1fb56 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_combined__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_combined__dfpo_0.xml @@ -1,3 +1,11 @@ +test_name: test_derived_metric_same_alias_components_combined +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of querying 2 metrics which give the same alias to the same thing in their components. + + In this case we DO combine source nodes, since the components are the same exact thing so we don't need to + scan over it twice +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_not_combined__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_not_combined__dfp_0.xml index d1d12ee4c6..359f64412f 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_not_combined__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_not_combined__dfp_0.xml @@ -1,3 +1,11 @@ +test_name: test_derived_metric_same_alias_components_not_combined +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of querying 2 metrics which give the same alias different things in their components. + + In this case we should NOT combine source nodes, since this would generate two columns with + the same alias. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_not_combined__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_not_combined__dfpo_0.xml index 2926cc46c9..d042ec2248 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_not_combined__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_same_alias_components_not_combined__dfpo_0.xml @@ -1,3 +1,11 @@ +test_name: test_derived_metric_same_alias_components_not_combined +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of querying 2 metrics which give the same alias different things in their components. + + In this case we should NOT combine source nodes, since this would generate two columns with + the same alias. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml index 9cd778e018..dd29aa36fa 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfp_0.xml @@ -1,3 +1,16 @@ +test_name: test_derived_metric_with_non_derived_metric +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of queries that use derived metrics and non-derived metrics. + + non_referred_bookings_pct is a derived metric that uses measures [bookings, referred_bookings] + booking_value is a proxy metric that uses measures [bookings] + + All these measures are from a single semantic model. + + Computation of non_referred_bookings_pct can be optimized to a single source, but isn't combined with the + computation for booking_value as it's not yet supported e.g. alias needed to be handled. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfpo_0.xml index b2957206d9..a2678a5d70 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_derived_metric_with_non_derived_metric__dfpo_0.xml @@ -1,3 +1,16 @@ +test_name: test_derived_metric_with_non_derived_metric +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of queries that use derived metrics and non-derived metrics. + + non_referred_bookings_pct is a derived metric that uses measures [bookings, referred_bookings] + booking_value is a proxy metric that uses measures [bookings] + + All these measures are from a single semantic model. + + Computation of non_referred_bookings_pct can be optimized to a single source, but isn't combined with the + computation for booking_value as it's not yet supported e.g. alias needed to be handled. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml index d6799bd36e..12968ec8d0 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfp_0.xml @@ -1,3 +1,8 @@ +test_name: test_duplicate_measures +test_filename: test_source_scan_optimizer.py +docstring: + Tests a case where derived metrics in a query use the same measure (in the same form e.g. filters). +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfpo_0.xml index 87336d0655..c4e4182d98 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_duplicate_measures__dfpo_0.xml @@ -1,3 +1,8 @@ +test_name: test_duplicate_measures +test_filename: test_source_scan_optimizer.py +docstring: + Tests a case where derived metrics in a query use the same measure (in the same form e.g. filters). +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml index dbb5e43e68..ad1fe19bb9 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfp_0.xml @@ -1,3 +1,11 @@ +test_name: test_nested_derived_metric +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of a query that use a nested derived metric from a single semantic model. + + The optimal solution would reduce this to 1 source scan, but there are challenges with derived metrics e.g. aliases, + so that is left as a future improvement. +--- diff --git a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfpo_0.xml b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfpo_0.xml index 01876f368b..b87ef8f5d7 100644 --- a/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfpo_0.xml +++ b/tests_metricflow/snapshots/test_source_scan_optimizer.py/DataflowPlan/test_nested_derived_metric__dfpo_0.xml @@ -1,3 +1,11 @@ +test_name: test_nested_derived_metric +test_filename: test_source_scan_optimizer.py +docstring: + Tests optimization of a query that use a nested derived metric from a single semantic model. + + The optimal solution would reduce this to 1 source scan, but there are challenges with derived metrics e.g. aliases, + so that is left as a future improvement. +--- diff --git a/tests_metricflow/snapshots/test_sql_expr_render.py/str/test_window_function_expr__rendered_sql.txt b/tests_metricflow/snapshots/test_sql_expr_render.py/str/test_window_function_expr__rendered_sql.txt index 7ca036f3ee..785cb63c99 100644 --- a/tests_metricflow/snapshots/test_sql_expr_render.py/str/test_window_function_expr__rendered_sql.txt +++ b/tests_metricflow/snapshots/test_sql_expr_render.py/str/test_window_function_expr__rendered_sql.txt @@ -1,3 +1,6 @@ +test_name: test_window_function_expr +test_filename: test_sql_expr_render.py +--- -- Window function with 0 PARTITION BY items(s) FIRST_VALUE(a.col0) OVER () diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan0.sql index 94a467a61a..b3cb816a71 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test0 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan1.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan1.sql index 4f2811f3ab..191affcbe5 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan1.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan1.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test1 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan2.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan2.sql index 9084cacd9c..7c8f87b9c6 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan2.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan2.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test2 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan3.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan3.sql index e283f191ed..cffda8fddd 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan3.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan3.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test3 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan4.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan4.sql index ac2f7ffe94..0327fdd63c 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan4.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan4.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test4 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan5.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan5.sql index 54e8459c20..fc7004a4ea 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan5.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_component_rendering__plan5.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test5 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_create_table_as__create_table_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_create_table_as__create_table_as.sql index dad404914d..6b126ad2f3 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_create_table_as__create_table_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_create_table_as__create_table_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE TABLE schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_create_table_as__create_view_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_create_table_as__create_view_as.sql index ddfb9d787d..43768106dc 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_create_table_as__create_view_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_create_table_as__create_view_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE VIEW schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_limit__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_limit__plan0.sql index 5720a09db8..8999ff0d20 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_limit__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_limit__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_limit +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_order_by__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_order_by__plan0.sql index bef477c2b8..d5077f356d 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_order_by__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_order_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_order_by +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_where__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_where__plan0.sql index 0f17ba24b2..9cebbb0545 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_where__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/BigQuery/test_render_where__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_where +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan0.sql index 94a467a61a..b3cb816a71 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test0 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan1.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan1.sql index 4f2811f3ab..191affcbe5 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan1.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan1.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test1 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan2.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan2.sql index 9084cacd9c..7c8f87b9c6 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan2.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan2.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test2 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan3.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan3.sql index e283f191ed..cffda8fddd 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan3.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan3.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test3 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan4.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan4.sql index 50c2a20f46..aaaed57adb 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan4.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan4.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test4 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan5.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan5.sql index 98affe9d30..efc798bbb0 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan5.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_component_rendering__plan5.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test5 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_create_table_as__create_table_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_create_table_as__create_table_as.sql index dad404914d..6b126ad2f3 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_create_table_as__create_table_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_create_table_as__create_table_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE TABLE schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_create_table_as__create_view_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_create_table_as__create_view_as.sql index ddfb9d787d..43768106dc 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_create_table_as__create_view_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_create_table_as__create_view_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE VIEW schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_limit__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_limit__plan0.sql index 5720a09db8..8999ff0d20 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_limit__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_limit__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_limit +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_order_by__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_order_by__plan0.sql index bef477c2b8..d5077f356d 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_order_by__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_order_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_order_by +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_where__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_where__plan0.sql index 0f17ba24b2..9cebbb0545 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_where__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Databricks/test_render_where__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_where +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan0.sql index 94a467a61a..b3cb816a71 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test0 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan1.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan1.sql index 4f2811f3ab..191affcbe5 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan1.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan1.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test1 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan2.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan2.sql index 9084cacd9c..7c8f87b9c6 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan2.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan2.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test2 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan3.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan3.sql index e283f191ed..cffda8fddd 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan3.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan3.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test3 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan4.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan4.sql index 50c2a20f46..aaaed57adb 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan4.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan4.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test4 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan5.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan5.sql index 98affe9d30..efc798bbb0 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan5.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_component_rendering__plan5.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test5 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_create_table_as__create_table_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_create_table_as__create_table_as.sql index dad404914d..6b126ad2f3 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_create_table_as__create_table_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_create_table_as__create_table_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE TABLE schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_create_table_as__create_view_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_create_table_as__create_view_as.sql index ddfb9d787d..43768106dc 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_create_table_as__create_view_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_create_table_as__create_view_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE VIEW schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_limit__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_limit__plan0.sql index 5720a09db8..8999ff0d20 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_limit__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_limit__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_limit +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_order_by__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_order_by__plan0.sql index bef477c2b8..d5077f356d 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_order_by__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_order_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_order_by +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_where__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_where__plan0.sql index 0f17ba24b2..9cebbb0545 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_where__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/DuckDB/test_render_where__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_where +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan0.sql index 94a467a61a..b3cb816a71 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test0 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan1.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan1.sql index 4f2811f3ab..191affcbe5 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan1.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan1.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test1 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan2.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan2.sql index 9084cacd9c..7c8f87b9c6 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan2.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan2.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test2 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan3.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan3.sql index e283f191ed..cffda8fddd 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan3.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan3.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test3 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan4.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan4.sql index 50c2a20f46..aaaed57adb 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan4.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan4.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test4 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan5.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan5.sql index 98affe9d30..efc798bbb0 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan5.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_component_rendering__plan5.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test5 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_create_table_as__create_table_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_create_table_as__create_table_as.sql index dad404914d..6b126ad2f3 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_create_table_as__create_table_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_create_table_as__create_table_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE TABLE schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_create_table_as__create_view_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_create_table_as__create_view_as.sql index ddfb9d787d..43768106dc 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_create_table_as__create_view_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_create_table_as__create_view_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE VIEW schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_limit__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_limit__plan0.sql index 5720a09db8..8999ff0d20 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_limit__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_limit__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_limit +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_order_by__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_order_by__plan0.sql index bef477c2b8..d5077f356d 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_order_by__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_order_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_order_by +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_where__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_where__plan0.sql index 0f17ba24b2..9cebbb0545 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_where__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Postgres/test_render_where__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_where +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan0.sql index 94a467a61a..b3cb816a71 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test0 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan1.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan1.sql index 4f2811f3ab..191affcbe5 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan1.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan1.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test1 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan2.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan2.sql index 9084cacd9c..7c8f87b9c6 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan2.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan2.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test2 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan3.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan3.sql index e283f191ed..cffda8fddd 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan3.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan3.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test3 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan4.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan4.sql index 50c2a20f46..aaaed57adb 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan4.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan4.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test4 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan5.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan5.sql index 98affe9d30..efc798bbb0 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan5.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_component_rendering__plan5.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test5 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_create_table_as__create_table_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_create_table_as__create_table_as.sql index dad404914d..6b126ad2f3 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_create_table_as__create_table_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_create_table_as__create_table_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE TABLE schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_create_table_as__create_view_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_create_table_as__create_view_as.sql index ddfb9d787d..43768106dc 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_create_table_as__create_view_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_create_table_as__create_view_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE VIEW schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_limit__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_limit__plan0.sql index 5720a09db8..8999ff0d20 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_limit__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_limit__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_limit +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_order_by__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_order_by__plan0.sql index bef477c2b8..d5077f356d 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_order_by__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_order_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_order_by +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_where__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_where__plan0.sql index 0f17ba24b2..9cebbb0545 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_where__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Redshift/test_render_where__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_where +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan0.sql index 94a467a61a..b3cb816a71 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test0 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan1.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan1.sql index 4f2811f3ab..191affcbe5 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan1.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan1.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test1 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan2.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan2.sql index 9084cacd9c..7c8f87b9c6 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan2.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan2.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test2 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan3.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan3.sql index e283f191ed..cffda8fddd 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan3.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan3.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test3 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan4.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan4.sql index 50c2a20f46..aaaed57adb 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan4.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan4.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test4 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan5.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan5.sql index 98affe9d30..efc798bbb0 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan5.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_component_rendering__plan5.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test5 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_create_table_as__create_table_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_create_table_as__create_table_as.sql index dad404914d..6b126ad2f3 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_create_table_as__create_table_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_create_table_as__create_table_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE TABLE schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_create_table_as__create_view_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_create_table_as__create_view_as.sql index ddfb9d787d..43768106dc 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_create_table_as__create_view_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_create_table_as__create_view_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE VIEW schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_limit__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_limit__plan0.sql index 5720a09db8..8999ff0d20 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_limit__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_limit__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_limit +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_order_by__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_order_by__plan0.sql index bef477c2b8..d5077f356d 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_order_by__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_order_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_order_by +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_where__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_where__plan0.sql index 0f17ba24b2..9cebbb0545 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_where__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Snowflake/test_render_where__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_where +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan0.sql index 94a467a61a..b3cb816a71 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test0 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan1.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan1.sql index 4f2811f3ab..191affcbe5 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan1.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan1.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test1 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan2.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan2.sql index 9084cacd9c..7c8f87b9c6 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan2.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan2.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test2 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan3.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan3.sql index e283f191ed..cffda8fddd 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan3.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan3.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test3 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan4.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan4.sql index 50c2a20f46..aaaed57adb 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan4.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan4.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test4 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan5.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan5.sql index 98affe9d30..efc798bbb0 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan5.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_component_rendering__plan5.sql @@ -1,3 +1,8 @@ +test_name: test_component_rendering +test_filename: test_sql_plan_render.py +docstring: + Checks that all components of SELECT query are rendered for the 0, 1, >1 component count cases. +--- -- test5 SELECT SUM(1) AS bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_create_table_as__create_table_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_create_table_as__create_table_as.sql index dad404914d..6b126ad2f3 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_create_table_as__create_table_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_create_table_as__create_table_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE TABLE schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_create_table_as__create_view_as.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_create_table_as__create_view_as.sql index ddfb9d787d..43768106dc 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_create_table_as__create_view_as.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_create_table_as__create_view_as.sql @@ -1,3 +1,6 @@ +test_name: test_render_create_table_as +test_filename: test_sql_plan_render.py +--- CREATE VIEW schema_name.table_name AS ( -- select_0 SELECT diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_limit__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_limit__plan0.sql index 5720a09db8..8999ff0d20 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_limit__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_limit__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_limit +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.bookings diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_order_by__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_order_by__plan0.sql index bef477c2b8..d5077f356d 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_order_by__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_order_by__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_order_by +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_where__plan0.sql b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_where__plan0.sql index 0f17ba24b2..9cebbb0545 100644 --- a/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_where__plan0.sql +++ b/tests_metricflow/snapshots/test_sql_plan_render.py/SqlQueryPlan/Trino/test_render_where__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_render_where +test_filename: test_sql_plan_render.py +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_distinct_select_node_is_not_reduced__after_reducing.sql b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_distinct_select_node_is_not_reduced__after_reducing.sql index 9acdadd458..f538ef984a 100644 --- a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_distinct_select_node_is_not_reduced__after_reducing.sql +++ b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_distinct_select_node_is_not_reduced__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_select_node_is_not_reduced +test_filename: test_sub_query_reducer.py +docstring: + Tests to ensure distinct select node doesn't get overwritten. +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_distinct_select_node_is_not_reduced__before_reducing.sql b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_distinct_select_node_is_not_reduced__before_reducing.sql index 9acdadd458..f538ef984a 100644 --- a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_distinct_select_node_is_not_reduced__before_reducing.sql +++ b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_distinct_select_node_is_not_reduced__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_distinct_select_node_is_not_reduced +test_filename: test_sub_query_reducer.py +docstring: + Tests to ensure distinct select node doesn't get overwritten. +--- -- test0 SELECT a.booking_value diff --git a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__after_reducing.sql b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__after_reducing.sql index 714038338d..c2c623b814 100644 --- a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__after_reducing.sql +++ b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reduce_sub_query +test_filename: test_sub_query_reducer.py +docstring: + Tests a case where an outer query should be reduced into its inner query with merged LIMIT expressions. +--- -- src1 -- src2 -- src3 diff --git a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__before_reducing.sql b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__before_reducing.sql index 140af8f3a0..2fca0b609f 100644 --- a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__before_reducing.sql +++ b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_reduce_sub_query__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_reduce_sub_query +test_filename: test_sub_query_reducer.py +docstring: + Tests a case where an outer query should be reduced into its inner query with merged LIMIT expressions. +--- -- src3 SELECT src2.col0 diff --git a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_rewrite_order_by_with_a_join_in_parent__after_reducing.sql b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_rewrite_order_by_with_a_join_in_parent__after_reducing.sql index 97624fda40..a286869211 100644 --- a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_rewrite_order_by_with_a_join_in_parent__after_reducing.sql +++ b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_rewrite_order_by_with_a_join_in_parent__after_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_rewrite_order_by_with_a_join_in_parent +test_filename: test_sub_query_reducer.py +docstring: + Tests rewriting an order by when the parent has a join. +--- -- src2 -- src3 SELECT diff --git a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_rewrite_order_by_with_a_join_in_parent__before_reducing.sql b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_rewrite_order_by_with_a_join_in_parent__before_reducing.sql index 5d9052261a..39b23d2420 100644 --- a/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_rewrite_order_by_with_a_join_in_parent__before_reducing.sql +++ b/tests_metricflow/snapshots/test_sub_query_reducer.py/SqlQueryPlan/test_rewrite_order_by_with_a_join_in_parent__before_reducing.sql @@ -1,3 +1,8 @@ +test_name: test_rewrite_order_by_with_a_join_in_parent +test_filename: test_sub_query_reducer.py +docstring: + Tests rewriting an order by when the parent has a join. +--- -- src3 SELECT src2.col0 diff --git a/tests_metricflow/snapshots/test_table_alias_simplifier.py/SqlQueryPlan/test_table_alias_simplification__after_alias_simplification.sql b/tests_metricflow/snapshots/test_table_alias_simplifier.py/SqlQueryPlan/test_table_alias_simplification__after_alias_simplification.sql index cd4226576a..ef3a220e2b 100644 --- a/tests_metricflow/snapshots/test_table_alias_simplifier.py/SqlQueryPlan/test_table_alias_simplification__after_alias_simplification.sql +++ b/tests_metricflow/snapshots/test_table_alias_simplifier.py/SqlQueryPlan/test_table_alias_simplification__after_alias_simplification.sql @@ -1,3 +1,8 @@ +test_name: test_table_alias_simplification +test_filename: test_table_alias_simplifier.py +docstring: + Tests a case where no pruning should occur. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_table_alias_simplifier.py/SqlQueryPlan/test_table_alias_simplification__before_alias_simplification.sql b/tests_metricflow/snapshots/test_table_alias_simplifier.py/SqlQueryPlan/test_table_alias_simplification__before_alias_simplification.sql index c8dce2c4a0..c7fcac1e8b 100644 --- a/tests_metricflow/snapshots/test_table_alias_simplifier.py/SqlQueryPlan/test_table_alias_simplification__before_alias_simplification.sql +++ b/tests_metricflow/snapshots/test_table_alias_simplifier.py/SqlQueryPlan/test_table_alias_simplification__before_alias_simplification.sql @@ -1,3 +1,8 @@ +test_name: test_table_alias_simplification +test_filename: test_table_alias_simplifier.py +docstring: + Tests a case where no pruning should occur. +--- -- test0 SELECT from_source.col0 AS from_source_col0 diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 0134837077..bcac1741df 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql index 6e87b4caae..d627e77974 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index 6dd6280953..a30d39e59e 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql index b0ed4836c9..853c5d10e8 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine__plan0.sql index 91e10c5ccd..7ba1e7d018 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine__plan0_optimized.sql index 3da2e2fa5f..a9b901ace5 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_filter__plan0.sql index bc55f9eed4..1d2a373e45 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql index 391e7f7219..849cf5a363 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_queried_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_queried_filter__plan0.sql index 8d611568f3..50871fdadd 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_queried_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_queried_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql index 41be8cd7d5..664e68145d 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/BigQuery/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 546a53c15c..c5e7bf4f31 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql index ed183f4066..f1bed673d9 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index 971ce1cff6..d73c5aab09 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql index fb7e2c593f..39b66c1f7f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine__plan0.sql index dfd4b38666..8ec0383216 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine__plan0_optimized.sql index 03e7c6a8a1..1bf389956b 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_filter__plan0.sql index 5731ba5b46..8eba1f0ecd 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql index 7db2cc2894..5df1ff5031 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_queried_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_queried_filter__plan0.sql index 46332b3996..c820ae4d9f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_queried_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_queried_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql index 19f81cdd9b..12e8a0e164 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Databricks/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index ff338c3d62..22f77d4bc8 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql index ed183f4066..f1bed673d9 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index a7fd42dafc..17455ec82e 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql index fb7e2c593f..39b66c1f7f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine__plan0.sql index 0ea077947e..df554fa249 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine__plan0_optimized.sql index 03e7c6a8a1..1bf389956b 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_filter__plan0.sql index 8eeaa11c1c..1a3fa1982f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql index 7db2cc2894..5df1ff5031 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_queried_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_queried_filter__plan0.sql index 24f29ee530..710065cff6 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_queried_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_queried_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql index 19f81cdd9b..12e8a0e164 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/DuckDB/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index ff338c3d62..22f77d4bc8 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql index ed183f4066..f1bed673d9 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index a7fd42dafc..17455ec82e 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql index fb7e2c593f..39b66c1f7f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine__plan0.sql index 0ea077947e..df554fa249 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine__plan0_optimized.sql index 03e7c6a8a1..1bf389956b 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_filter__plan0.sql index 8eeaa11c1c..1a3fa1982f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql index 7db2cc2894..5df1ff5031 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_queried_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_queried_filter__plan0.sql index 24f29ee530..710065cff6 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_queried_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_queried_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql index 19f81cdd9b..12e8a0e164 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Postgres/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 72081ddc87..50ec782e57 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql index ed183f4066..f1bed673d9 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index 0e3b950240..fcaf142783 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql index fb7e2c593f..39b66c1f7f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine__plan0.sql index c326cd2894..cdc589e162 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine__plan0_optimized.sql index 03e7c6a8a1..1bf389956b 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_filter__plan0.sql index eaa3a8eb4d..2c2879f7a3 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql index 7db2cc2894..5df1ff5031 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_queried_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_queried_filter__plan0.sql index a7407a95de..4917d56a15 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_queried_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_queried_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql index 19f81cdd9b..12e8a0e164 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Redshift/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 95a63d3b6c..7eb11daf5f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql index ed183f4066..f1bed673d9 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index fd9ed3dd3b..e1a1272cfe 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql index fb7e2c593f..39b66c1f7f 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine__plan0.sql index f7057f7312..63135f6767 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine__plan0_optimized.sql index 03e7c6a8a1..1bf389956b 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_filter__plan0.sql index 6fda495f52..967bd47920 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql index 7db2cc2894..5df1ff5031 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_queried_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_queried_filter__plan0.sql index 5adf4a22a0..34a944f591 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_queried_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_queried_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql index 19f81cdd9b..12e8a0e164 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Snowflake/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_input_measure_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_input_measure_constraint__plan0.sql index 758aa77872..e21c305af9 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_input_measure_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_input_measure_constraint__plan0.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql index ed183f4066..f1bed673d9 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_input_measure_constraint__plan0_optimized.sql @@ -1,3 +1,10 @@ +test_name: test_join_to_time_spine_with_input_measure_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Check filter hierarchy. + + Ensure that the measure filter 'booking__is_instant' doesn't get applied again post-aggregation. +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_queried_time_constraint__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_queried_time_constraint__plan0.sql index 49f3c834a9..1402cf7852 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_queried_time_constraint__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_queried_time_constraint__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql index bfc306b207..c3b3403d78 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_join_to_time_spine_with_queried_time_constraint__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_join_to_time_spine_with_queried_time_constraint +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric that fills nulls is queried with metric time and a time constraint. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine__plan0.sql index 138a4b4df5..3a9c1c9c1a 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine__plan0.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Compute Metrics via Expressions SELECT subq_6.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine__plan0_optimized.sql index 03e7c6a8a1..1bf389956b 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine__plan0_optimized.sql @@ -1,3 +1,6 @@ +test_name: test_simple_join_to_time_spine +test_filename: test_time_spine_join_rendering.py +--- -- Join to Time Spine Dataset -- Compute Metrics via Expressions SELECT diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_filter__plan0.sql index 92115c5fd1..a50e2561b8 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT subq_7.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql index 7db2cc2894..5df1ff5031 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is not in group by. Should apply constraint once. +--- -- Compute Metrics via Expressions SELECT metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_queried_filter__plan0.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_queried_filter__plan0.sql index 27ea74cbc7..c011edd5a2 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_queried_filter__plan0.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_queried_filter__plan0.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT subq_8.metric_time__day diff --git a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql index 19f81cdd9b..12e8a0e164 100644 --- a/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql +++ b/tests_metricflow/snapshots/test_time_spine_join_rendering.py/SqlQueryPlan/Trino/test_simple_join_to_time_spine_with_queried_filter__plan0_optimized.sql @@ -1,3 +1,8 @@ +test_name: test_simple_join_to_time_spine_with_queried_filter +test_filename: test_time_spine_join_rendering.py +docstring: + Test case where metric fills nulls and filter is in group by. Should apply constraint twice. +--- -- Compute Metrics via Expressions SELECT metric_time__day