From 4aa90958dff3f7e7a0a203ffdcb624db1db5a2f6 Mon Sep 17 00:00:00 2001 From: Courtney Holcomb Date: Tue, 24 Sep 2024 07:58:13 -0700 Subject: [PATCH] Fix check query SQL --- .../test_cases/itest_granularity.yaml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tests_metricflow/integration/test_cases/itest_granularity.yaml b/tests_metricflow/integration/test_cases/itest_granularity.yaml index e63835fdc2..33bc237655 100644 --- a/tests_metricflow/integration/test_cases/itest_granularity.yaml +++ b/tests_metricflow/integration/test_cases/itest_granularity.yaml @@ -391,17 +391,11 @@ integration_test: FROM ( SELECT ts2.martian_day AS metric_time__martian_day - , SUM(ts2.booking_value) AS booking_value - FROM ( - SELECT - ts.ds AS metric_time__day - , b.booking_value AS booking_value - FROM {{ source_schema }}.mf_time_spine ts - INNER JOIN {{ source_schema }}.fct_bookings b - ON {{ render_date_sub("ts", "ds", 1, TimeGranularity.WEEK) }} = {{ render_date_trunc("b.ds", TimeGranularity.DAY) }} - ) ts2 - LEFT OUTER JOIN {{ source_schema }}.mf_time_spine ts2 - ON ts2.metric_time__day = ts2.ds + , SUM(b.booking_value) AS booking_value + FROM {{ source_schema }}.mf_time_spine ts + INNER JOIN {{ source_schema }}.fct_bookings b + ON {{ render_date_sub("ts", "ds", 1, TimeGranularity.WEEK) }} = {{ render_date_trunc("b.ds", TimeGranularity.DAY) }} + LEFT OUTER JOIN {{ source_schema }}.mf_time_spine ts2 ON ts.ds = ts2.ds GROUP BY ts2.martian_day ) subq_8 FULL OUTER JOIN (