diff --git a/tests_metricflow/integration/test_cases/itest_metrics.yaml b/tests_metricflow/integration/test_cases/itest_metrics.yaml index cd9fb47c2..f6bbf6a43 100644 --- a/tests_metricflow/integration/test_cases/itest_metrics.yaml +++ b/tests_metricflow/integration/test_cases/itest_metrics.yaml @@ -551,6 +551,21 @@ integration_test: ds ) a --- +integration_test: + name: shared_alias_derived_metric + description: Tests derived metrics which use the same alias for different things + model: SIMPLE_MODEL + metrics: ["derived_sharedalias_1a", "derived_sharedalias_2"] + group_bys: ["booking__is_instant"] + check_query: | + SELECT + is_instant AS booking__is_instant + , COUNT(*) - 10 AS derived_sharedalias_1a + , SUM(CASE WHEN is_instant THEN 1 ELSE 0 END) + 10 AS derived_sharedalias_2 + FROM {{ source_schema }}.fct_bookings + GROUP BY + booking__is_instant +--- integration_test: name: two_metrics_with_null_dimension_values description: Tests querying two metrics with a dimension having a NULL values