Skip to content

Commit

Permalink
Rename metric
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Jul 22, 2024
1 parent 33c9852 commit b0f3528
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ metric:
filter: "{{ TimeDimension('metric_time') }} < '2012-12-20'"
---
metric:
name: bookings_dec_19_2019
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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'listing__booking__listing__booking_value_sub_instant_add_10',
'listing__booking__listing__bookings',
'listing__booking__listing__bookings_before_dec_20_2019',
'listing__booking__listing__bookings_dec_19_2019',
'listing__booking__listing__bookings_between_dec_18_2019_and_dec_20_2019',
'listing__booking__listing__bookings_fill_nulls_with_0',
'listing__booking__listing__bookings_fill_nulls_with_0_without_time_spine',
'listing__booking__listing__bookings_join_to_time_spine',
Expand Down Expand Up @@ -57,7 +57,7 @@
'listing__booking_value_sub_instant_add_10',
'listing__bookings',
'listing__bookings_before_dec_20_2019',
'listing__bookings_dec_19_2019',
'listing__bookings_between_dec_18_2019_and_dec_20_2019',
'listing__bookings_fill_nulls_with_0',
'listing__bookings_fill_nulls_with_0_without_time_spine',
'listing__bookings_join_to_time_spine',
Expand Down Expand Up @@ -267,7 +267,7 @@
'user__listing__user__booking_value_sub_instant_add_10',
'user__listing__user__bookings',
'user__listing__user__bookings_before_dec_20_2019',
'user__listing__user__bookings_dec_19_2019',
'user__listing__user__bookings_between_dec_18_2019_and_dec_20_2019',
'user__listing__user__bookings_fill_nulls_with_0',
'user__listing__user__bookings_fill_nulls_with_0_without_time_spine',
'user__listing__user__bookings_join_to_time_spine',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Model Join-Path Entity Links
('listings_latest',) ("('listing',)", "('booking', 'listing')") booking_value_sub_instant_add_10 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_before_dec_20_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_dec_19_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_between_dec_18_2019_and_dec_20_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_fill_nulls_with_0 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_fill_nulls_with_0_without_time_spine ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('booking', 'listing')") bookings_join_to_time_spine ['JOINED', 'METRIC']
Expand Down Expand Up @@ -80,7 +80,7 @@ Model Join-Path Entity Links
('listings_latest',) ("('listing',)", "('listing',)") booking_value_sub_instant_add_10 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('listing',)") bookings ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('listing',)") bookings_before_dec_20_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('listing',)") bookings_dec_19_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('listing',)") bookings_between_dec_18_2019_and_dec_20_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('listing',)") bookings_fill_nulls_with_0 ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('listing',)") bookings_fill_nulls_with_0_without_time_spine ['JOINED', 'METRIC']
('listings_latest',) ("('listing',)", "('listing',)") bookings_join_to_time_spine ['JOINED', 'METRIC']
Expand Down Expand Up @@ -141,7 +141,7 @@ Model Join-Path Entity Links
('listings_latest',) ("('user',)", "('listing', 'user')") booking_value_sub_instant_add_10 ['JOINED', 'METRIC']
('listings_latest',) ("('user',)", "('listing', 'user')") bookings ['JOINED', 'METRIC']
('listings_latest',) ("('user',)", "('listing', 'user')") bookings_before_dec_20_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('user',)", "('listing', 'user')") bookings_dec_19_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('user',)", "('listing', 'user')") bookings_between_dec_18_2019_and_dec_20_2019 ['JOINED', 'METRIC']
('listings_latest',) ("('user',)", "('listing', 'user')") bookings_fill_nulls_with_0 ['JOINED', 'METRIC']
('listings_latest',) ("('user',)", "('listing', 'user')") bookings_fill_nulls_with_0_without_time_spine ['JOINED', 'METRIC']
('listings_latest',) ("('user',)", "('listing', 'user')") bookings_join_to_time_spine ['JOINED', 'METRIC']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
'company__listing__user__company__booking_value_sub_instant_add_10',
'company__listing__user__company__bookings',
'company__listing__user__company__bookings_before_dec_20_2019',
'company__listing__user__company__bookings_dec_19_2019',
'company__listing__user__company__bookings_between_dec_18_2019_and_dec_20_2019',
'company__listing__user__company__bookings_fill_nulls_with_0',
'company__listing__user__company__bookings_fill_nulls_with_0_without_time_spine',
'company__listing__user__company__bookings_join_to_time_spine',
Expand Down Expand Up @@ -128,7 +128,7 @@
'guest__booking__guest__booking_value_sub_instant_add_10',
'guest__booking__guest__bookings',
'guest__booking__guest__bookings_before_dec_20_2019',
'guest__booking__guest__bookings_dec_19_2019',
'guest__booking__guest__bookings_between_dec_18_2019_and_dec_20_2019',
'guest__booking__guest__bookings_fill_nulls_with_0',
'guest__booking__guest__bookings_fill_nulls_with_0_without_time_spine',
'guest__booking__guest__bookings_join_to_time_spine',
Expand Down Expand Up @@ -163,7 +163,7 @@
'guest__booking_value_sub_instant_add_10',
'guest__bookings',
'guest__bookings_before_dec_20_2019',
'guest__bookings_dec_19_2019',
'guest__bookings_between_dec_18_2019_and_dec_20_2019',
'guest__bookings_fill_nulls_with_0',
'guest__bookings_fill_nulls_with_0_without_time_spine',
'guest__bookings_join_to_time_spine',
Expand Down Expand Up @@ -209,7 +209,7 @@
'host__booking__host__booking_value_sub_instant_add_10',
'host__booking__host__bookings',
'host__booking__host__bookings_before_dec_20_2019',
'host__booking__host__bookings_dec_19_2019',
'host__booking__host__bookings_between_dec_18_2019_and_dec_20_2019',
'host__booking__host__bookings_fill_nulls_with_0',
'host__booking__host__bookings_fill_nulls_with_0_without_time_spine',
'host__booking__host__bookings_join_to_time_spine',
Expand Down Expand Up @@ -244,7 +244,7 @@
'host__booking_value_sub_instant_add_10',
'host__bookings',
'host__bookings_before_dec_20_2019',
'host__bookings_dec_19_2019',
'host__bookings_between_dec_18_2019_and_dec_20_2019',
'host__bookings_fill_nulls_with_0',
'host__bookings_fill_nulls_with_0_without_time_spine',
'host__bookings_join_to_time_spine',
Expand Down Expand Up @@ -291,7 +291,7 @@
'listing__booking__listing__booking_value_sub_instant_add_10',
'listing__booking__listing__bookings',
'listing__booking__listing__bookings_before_dec_20_2019',
'listing__booking__listing__bookings_dec_19_2019',
'listing__booking__listing__bookings_between_dec_18_2019_and_dec_20_2019',
'listing__booking__listing__bookings_fill_nulls_with_0',
'listing__booking__listing__bookings_fill_nulls_with_0_without_time_spine',
'listing__booking__listing__bookings_join_to_time_spine',
Expand Down Expand Up @@ -327,7 +327,7 @@
'listing__booking_value_sub_instant_add_10',
'listing__bookings',
'listing__bookings_before_dec_20_2019',
'listing__bookings_dec_19_2019',
'listing__bookings_between_dec_18_2019_and_dec_20_2019',
'listing__bookings_fill_nulls_with_0',
'listing__bookings_fill_nulls_with_0_without_time_spine',
'listing__bookings_join_to_time_spine',
Expand Down Expand Up @@ -400,7 +400,7 @@
'lux_listing__listing__lux_listing__booking_value_sub_instant_add_10',
'lux_listing__listing__lux_listing__bookings',
'lux_listing__listing__lux_listing__bookings_before_dec_20_2019',
'lux_listing__listing__lux_listing__bookings_dec_19_2019',
'lux_listing__listing__lux_listing__bookings_between_dec_18_2019_and_dec_20_2019',
'lux_listing__listing__lux_listing__bookings_fill_nulls_with_0',
'lux_listing__listing__lux_listing__bookings_fill_nulls_with_0_without_time_spine',
'lux_listing__listing__lux_listing__bookings_join_to_time_spine',
Expand Down Expand Up @@ -513,7 +513,7 @@
'user__listing__user__booking_value_sub_instant_add_10',
'user__listing__user__bookings',
'user__listing__user__bookings_before_dec_20_2019',
'user__listing__user__bookings_dec_19_2019',
'user__listing__user__bookings_between_dec_18_2019_and_dec_20_2019',
'user__listing__user__bookings_fill_nulls_with_0',
'user__listing__user__bookings_fill_nulls_with_0_without_time_spine',
'user__listing__user__bookings_join_to_time_spine',
Expand Down
4 changes: 2 additions & 2 deletions tests_metricflow/integration/test_cases/itest_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2220,10 +2220,10 @@ 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_dec_19_2019"]
metrics: ["bookings_between_dec_18_2019_and_dec_20_2019"]
check_query: |
SELECT
SUM(1) AS bookings_dec_19_2019
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 b0f3528

Please sign in to comment.