From fc78da557fbfa3b366c39ad72febcf8f6110f938 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Thu, 25 Jan 2024 21:04:50 -0800 Subject: [PATCH] Use appropriate primary entity name in test YAML --- metricflow/test/query/test_query_parser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/metricflow/test/query/test_query_parser.py b/metricflow/test/query/test_query_parser.py index 1c83b5c3a8..491dde3573 100644 --- a/metricflow/test/query/test_query_parser.py +++ b/metricflow/test/query/test_query_parser.py @@ -103,7 +103,7 @@ type: categorical expr: country - primary_entity: company + primary_entity: revenue_instance entities: - name: user @@ -455,7 +455,7 @@ def test_cumulative_metric_wrong_time_dimension_validation() -> None: with pytest.raises(InvalidQueryException, match="do not include 'metric_time'"): query_parser.parse_and_validate_query( metric_names=["revenue_cumulative"], - group_by_names=["company__loaded_at"], + group_by_names=["revenue_instance__loaded_at"], ) @@ -468,7 +468,7 @@ def test_cumulative_metric_agg_time_dimension_name_validation() -> None: [EXAMPLE_PROJECT_CONFIGURATION_YAML_CONFIG_FILE, bookings_yaml_file, revenue_yaml_file, metrics_yaml_file] ) - query_parser.parse_and_validate_query(metric_names=["revenue_cumulative"], group_by_names=["company__ds"]) + query_parser.parse_and_validate_query(metric_names=["revenue_cumulative"], group_by_names=["revenue_instance__ds"]) def test_derived_metric_query_parsing() -> None: @@ -518,7 +518,7 @@ def test_derived_metric_with_offset_parsing() -> None: with pytest.raises(InvalidQueryException, match="do not include 'metric_time'"): query_parser.parse_and_validate_query( metric_names=["revenue_growth_2_weeks"], - group_by_names=["company__country"], + group_by_names=["revenue_instance__country"], ) # Query with time dimension