Skip to content

Commit

Permalink
Remove tests that require engine-specific syntax in metric definitions
Browse files Browse the repository at this point in the history
These are breaking for Trino, so I'm removing them for now. I have a task up to put up equivalent tests in SQL rendering section instead, where I can specify to skip for Trino.
  • Loading branch information
courtneyholcomb committed Jul 29, 2024
1 parent ed9555c commit b1ec4d6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -783,22 +783,3 @@ metric:
name: listings
filter: "{{ Metric('views', ['listing']) }} > 10"
time_granularity: week
---
metric:
name: bookings_before_dec_20_2019
description: Bookings up to the end of 2022
type: simple
type_params:
measure: bookings
filter: "{{ TimeDimension('metric_time') }} < '2012-12-20'"
---
metric:
name: bookings_between_dec_18_2019_and_dec_20_2019
description: Bookings starting in 2020. Used to test a metric with different types of ambiguous filters in on its input metric.
type: derived
type_params:
expr: bookings_before_dec_20_2019
metrics:
- name: bookings_before_dec_20_2019
filter: "{{ TimeDimension('metric_time') }} > '2019-12-18'"
time_granularity: week
12 changes: 0 additions & 12 deletions tests_metricflow/integration/test_cases/itest_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2215,15 +2215,3 @@ integration_test:
GROUP BY {{ render_date_trunc("ds", TimeGranularity.DAY) }}
) a ON b.ds = a.ds
WHERE {{ render_between_time_constraint("b.ds", "2020-01-03", "2020-01-03") }}
---
integration_test:
name: metric_time_filter_on_input_metric
description: Test a metric with a filter defined on its input metric.
model: SIMPLE_MODEL
metrics: ["bookings_between_dec_18_2019_and_dec_20_2019"]
check_query: |
SELECT
SUM(1) AS bookings_between_dec_18_2019_and_dec_20_2019
FROM {{ source_schema }}.fct_bookings
WHERE ({{ render_date_trunc("ds", TimeGranularity.DAY) }} < '2012-12-20')
AND ({{ render_date_trunc("ds", TimeGranularity.WEEK) }} > '2019-12-18')

0 comments on commit b1ec4d6

Please sign in to comment.