Merged PR 3469: Switches Listing and Deal metrics

# Description

Switches Listings and Deal metrics to production.
I also modified the dependencies on the old lifecycles to read from the news, so we can remove these in a following PR.

I'm considering re-computing also the dimension - specific models to operate within KPIs folder, but will do this later on in a dedicated PR.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [ ] I have checked for DRY opportunities with other models and docs.
- [ ] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Related work items: #23761
This commit is contained in:
Oriol Roqué Paniagua 2024-11-08 11:11:04 +00:00
parent 335ba9a29b
commit 5e1b418570
4 changed files with 63 additions and 49 deletions

View file

@ -3,8 +3,8 @@
{{ config(materialized="table", unique_key=["date", "dimension", "dimension_value"]) }}
with
int_core__mtd_accommodation_segmentation as (
select * from {{ ref("int_core__mtd_accommodation_segmentation") }}
int_kpis__dimension_daily_accommodation as (
select * from {{ ref("int_kpis__dimension_daily_accommodation") }}
),
int_core__user_host as (select * from {{ ref("int_core__user_host") }}),
int_dates_mtd as (select * from {{ ref("int_dates_mtd") }})
@ -23,7 +23,7 @@ with
d.is_current_month
from int_dates_mtd d
{% if dimension.dimension == "'by_number_of_listings'" %}
inner join int_core__mtd_accommodation_segmentation a on d.date = a.date
inner join int_kpis__dimension_daily_accommodation a on d.date = a.date
{% elif dimension.dimension == "'by_billing_country'" %}
inner join
int_core__user_host h