Merged PR 3616: Compute weekly new dash created services
# Description Changes: * Fixes weekly dates for KPIs. Before, joins were not working (but nothing was really used). * Computes weekly new dash created services and exposes it to reporting # 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. - [X] 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: #20809
This commit is contained in:
parent
2d6afbfd42
commit
2e7c85d11b
6 changed files with 254 additions and 3 deletions
|
|
@ -5497,6 +5497,184 @@ models:
|
|||
apply to the same booking and these do not need to be created in the same
|
||||
time period. Therefore, it's not an additive metric.
|
||||
|
||||
- name: int_kpis__metric_weekly_new_dash_created_services
|
||||
description: |
|
||||
This model computes the Weekly Created Services at the
|
||||
deepest granularity.
|
||||
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.
|
||||
Be aware that any dimension that can change over the weekly period,
|
||||
such as daily segmentations, are included in the primary key of the
|
||||
model.
|
||||
|
||||
The unique key corresponds to:
|
||||
- end_date,
|
||||
- service_name,
|
||||
- id_user_host,
|
||||
- active_accommodations_per_deal_segmentation.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- service_name
|
||||
- id_user_host
|
||||
- active_accommodations_per_deal_segmentation
|
||||
|
||||
columns:
|
||||
- name: start_date
|
||||
data_type: date
|
||||
description: |
|
||||
The start date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: service_name
|
||||
data_type: string
|
||||
description: Name of the created service.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_user_host
|
||||
data_type: string
|
||||
description: Unique identifier of the user that acts as Host.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: Unique identifier of an account.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: is_upgraded_service
|
||||
data_type: string
|
||||
description: |
|
||||
Whether the service is an upgraded version of the
|
||||
default. In other words, if it's not Basic Screening.
|
||||
tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "YES"
|
||||
- "NO"
|
||||
|
||||
- name: new_dash_version
|
||||
data_type: string
|
||||
description: |
|
||||
The version of the New Dash. It corresponds to the
|
||||
release or migration phase from user point of view.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: string
|
||||
description: |
|
||||
Segment value based on the number of listings booked in 12 months
|
||||
for a given deal and date.
|
||||
tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "0"
|
||||
- "01-05"
|
||||
- "06-20"
|
||||
- "21-60"
|
||||
- "61+"
|
||||
- "UNSET"
|
||||
|
||||
- name: main_billing_country_iso_3_per_deal
|
||||
data_type: string
|
||||
description: |
|
||||
Main billing country of the host aggregated at Deal level.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_services
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of services created in a given month and per specified dimension.
|
||||
|
||||
- name: booking_with_created_services_count
|
||||
data_type: bigint
|
||||
description: |
|
||||
Count of unique bookings in a given month and per specified dimension.
|
||||
This is an approximation to booking count since different services can
|
||||
apply to the same booking and these do not need to be created in the same
|
||||
time period. Therefore, it's not an additive metric.
|
||||
|
||||
- name: int_kpis__agg_weekly_new_dash_created_services
|
||||
description: |
|
||||
This model computes the dimension aggregation for Weekly Created 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 end_date, dimension and dimension_value.
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- end_date
|
||||
- dimension
|
||||
- dimension_value
|
||||
|
||||
columns:
|
||||
- name: start_date
|
||||
data_type: date
|
||||
description: |
|
||||
The start date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: end_date
|
||||
data_type: date
|
||||
description: |
|
||||
The end date of the time range considered for the metrics in this record.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
- assert_dimension_completeness:
|
||||
metric_column_names:
|
||||
- created_services
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
- by_deal
|
||||
- by_new_dash_version
|
||||
- by_has_upgraded_service
|
||||
- by_service
|
||||
- by_host
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: created_services
|
||||
data_type: bigint
|
||||
description: The weekly created services for a given date range, dimension and value.
|
||||
|
||||
- name: booking_with_created_services_count
|
||||
data_type: bigint
|
||||
description: |
|
||||
The weekly bookings with created services for a given date range, dimension and value.
|
||||
This is an approximation to booking count since different services can
|
||||
apply to the same booking and these do not need to be created in the same
|
||||
time period. Therefore, it's not an additive metric.
|
||||
|
||||
- name: int_kpis__agg_monthly_new_dash_created_services
|
||||
description: |
|
||||
This model computes the dimension aggregation for Monthly Created Services.
|
||||
|
|
@ -5650,6 +5828,7 @@ models:
|
|||
- accepted_values:
|
||||
values:
|
||||
- daily
|
||||
- weekly
|
||||
- monthly
|
||||
|
||||
- name: dimension
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue