Committing for testing

This commit is contained in:
Joaquin 2025-03-26 15:10:50 +01:00
parent f7504393c4
commit 18988eadde
3 changed files with 83 additions and 2 deletions

View file

@ -0,0 +1,22 @@
{% set dimensions = get_kpi_dimensions_per_model("NEW_DASH_DEALS_OFFERED_SERVICES") %}
{{ config(materialized="table", unique_key=["date", "dimension", "dimension_value"]) }}
{% for dimension in dimensions %}
select
-- Unique Key --
d.date,
{{ dimension.dimension }} as dimension,
{{ dimension.dimension_value }} as dimension_value,
-- Metrics --
count(distinct dos.id_deal) as deal_with_offered_service_count
from {{ ref("int_kpis__dimension_dates") }} d
left join
{{ ref("int_kpis__metric_daily_new_dash_deals_offered_services") }} as dos
on d.date = dos.date
group by 1, 2, 3
{% if not loop.last %}
union all
{% endif %}
{% endfor %}

View file

@ -7587,4 +7587,54 @@ models:
description: |
Main billing country of the host aggregated at Deal level.
data_tests:
- not_null
- not_null
- name: int_kpis__agg_daily_new_dash_deals_offered_services
description: |
This model computes the dimension aggregation for Daily Deals Offered Services.
It only retrieves services that come from users that are in New Dash, as well
as it only considers services created after the user has moved to New Dash.
The primary key of this model is date, dimension and dimension_value.
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date
- dimension
- dimension_value
columns:
- name: date
data_type: date
description: |
The daily date acting as time range for the metrics in this record.
data_tests:
- not_null
- name: dimension
data_type: string
description: The dimension or granularity of the metrics.
data_tests:
- assert_dimension_completeness:
metric_column_names:
- deal_with_offered_service_count
- accepted_values:
values:
- global
- by_number_of_listings
- by_billing_country
- by_new_dash_version
- by_has_upgraded_service
- by_service
- by_service_business_type
- name: dimension_value
data_type: string
description: The value or segment available for the selected dimension.
data_tests:
- not_null
- name: deal_with_offered_service_count
data_type: bigint
description: |
The daily count of deals with services offered for a given date, dimension and value.