Merged PR 3472: Remove unused models and schema entries for deals and accommodations
# Description Eliminates models that have been switched with new kpis flow. Also deletes temporary tests and schema entries. # Checklist - [X] The edited models and dependants run properly with production data. - [NA] The edited models are sufficiently documented. - [X] The edited models contain PK tests, and I've ran and passed them. - [X] I have checked for DRY opportunities with other models and docs. - [NA] 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: #23762
This commit is contained in:
parent
5e1b418570
commit
2f80642f6c
10 changed files with 1 additions and 1358 deletions
|
|
@ -436,71 +436,6 @@ models:
|
|||
"The amount for which the guest user is covered if he faces problems
|
||||
during check-in in GBP."
|
||||
|
||||
- name: int_core__monthly_accommodation_history_by_deal
|
||||
description: |
|
||||
This model contains the historic information regarding the accommodations, also known
|
||||
as listings, for each deal id. It's used for the business KPIs in the view by deal id.
|
||||
Data is aggregated at the last day of the month, or up to yesterday if it's the
|
||||
current month.
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- id_deal
|
||||
|
||||
deprecation_date: 2024-11-30
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
data_type: date
|
||||
description: The last day of the month or yesterday for historic listing metrics.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: character varying
|
||||
description: Id of the deal associated to the host.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: int_core__mtd_accommodation_metrics
|
||||
description: |
|
||||
This model contains the historic information regarding the accommodations in an aggregated manner.
|
||||
It's used for the business KPIs. Data is aggregated at the last day of the month and in the
|
||||
days necessary for the Month-to-Date computation of the current month.
|
||||
|
||||
deprecation_date: 2024-11-30
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- dimension
|
||||
- dimension_value
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
data_type: date
|
||||
description: The date for the month-to-date accommodation-related metrics.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: dimension
|
||||
data_type: string
|
||||
description: The dimension or granularity of the metrics.
|
||||
tests:
|
||||
- accepted_values:
|
||||
values:
|
||||
- global
|
||||
- by_number_of_listings
|
||||
- by_billing_country
|
||||
|
||||
- name: dimension_value
|
||||
data_type: string
|
||||
description: The value or segment available for the selected dimension.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: int_core__verification_request_completeness
|
||||
description: |
|
||||
The `int_core__verification_request_completeness` model allows to determine if a verification request is
|
||||
|
|
@ -961,8 +896,7 @@ models:
|
|||
Boolean to indicate if the listing is active or not. If false, this is considered as a
|
||||
hard deactivation - meaning no more bookings can be assigned to this listing. However,
|
||||
even if a listing is active, that does not necessarily mean that it's receiving bookings.
|
||||
Do not confuse this column with the lifecycle activity of a listing that is computed in
|
||||
int_core__mtd_accommodation_lifecycle.
|
||||
Do not confuse this column with the lifecycle activity of a listing.
|
||||
|
||||
- name: town
|
||||
data_type: character varying
|
||||
|
|
@ -1019,157 +953,6 @@ models:
|
|||
data_type: timestamp
|
||||
description: Timestamp of when the accommodation record was extracted from the backend into the DWH.
|
||||
|
||||
- name: int_core__mtd_accommodation_lifecycle
|
||||
description: |
|
||||
This model contains the historic information regarding the lifecycle of accommodations, also known as
|
||||
listings. The information regarding the booking-related time allows for the current status of any listing
|
||||
regarding its activity. This information is encapsulated in the following columns:
|
||||
|
||||
accommodation_lifecycle_state: contains one of the following states
|
||||
- 01-New: Listings that have been created in the current month, without bookings
|
||||
- 02-Never Booked: Listings that have been created before the current month, without bookings.
|
||||
- 03-First Time Booked: Listings that have been booked for the first time in the current month.
|
||||
- 04-Active: Listings that have booking activity in the past 12 months (that are not FTB nor reactivated)
|
||||
- 05-Churning: Listings that are becoming inactive because of lack of bookings in the past 12 months
|
||||
- 06-Inactive: Listings that have not had a booking for more than 12 months.
|
||||
- 07-Reactivated: Listings that have had a booking in the current month that were inactive or churning before.
|
||||
- Finally, if none of the logic applies, which should not happen, null will be set and a dbt alert will raise.
|
||||
|
||||
Since the states of Active, First Time Booked and Reactivated indicate certain booking activity and are
|
||||
mutually exclusive, the model also provides information of the recency of the bookings by the following
|
||||
booleans:
|
||||
- has_been_booked_within_current_month: If a listing has had a booking created in the current month
|
||||
- has_been_booked_within_last_6_months: If a listing has had a booking created in the past 6 months
|
||||
- has_been_booked_within_last_12_months: If a listing has had a booking created in the past 12 months
|
||||
Note that if a listing has had a booking created in a given month, all 3 columns will be true. Similarly,
|
||||
if the last booking created to a listing was 5 months ago, only the column has_been_booked_in_1_month
|
||||
will be false; while the other 2 will be true.
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- id_accommodation
|
||||
|
||||
deprecation_date: 2024-11-30
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
data_type: date
|
||||
description: The date for the month-to-date. Information is inclusive to the date displayed.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_accommodation
|
||||
data_type: bigint
|
||||
description: Id of the accommodation or listing.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: creation_date_utc
|
||||
data_type: date
|
||||
description: Date of when the listing was created.
|
||||
|
||||
- name: first_time_booked_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
Date of the first booking created for a given listing. Can be null if the listing
|
||||
has never had a booking associated with it.
|
||||
|
||||
- name: last_time_booked_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
Date of the last booking created for a given listing. Can be null if the listing
|
||||
has never had a booking associated with it. Can be the same as first_time_booked_date_utc
|
||||
if the listing only had 1 booking in its history.
|
||||
|
||||
- name: second_to_last_time_booked_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
Date of the second-to-last booking created for a given listing, meaning the creation
|
||||
date of the booking that precedes the last one. It's relevant for the reactivation computation
|
||||
on the lifecycle. Can be null if the listing has never had a booking associated with it or if
|
||||
the listing only had 1 booking in its history.
|
||||
|
||||
- name: accommodation_lifecycle_state
|
||||
data_type: character varying
|
||||
description: |
|
||||
Contains the lifecycle state of a Listing. The accepted values are:
|
||||
01-New, 02-Never Booked, 03-First Time Booked, 04-Active, 05-Churning, 06-Inactive,
|
||||
07-Reactivated. Failing to implement the logic will result in alert.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: has_been_booked_within_current_month
|
||||
data_type: boolean
|
||||
description: If the listing has had a booking created in the current month.
|
||||
|
||||
- name: has_been_booked_within_last_6_months
|
||||
data_type: boolean
|
||||
description: If the listing has had a booking created in the past 6 months.
|
||||
|
||||
- name: has_been_booked_within_last_12_months
|
||||
data_type: boolean
|
||||
description: If the listing has had a booking created in the past 12 months.
|
||||
|
||||
- name: int_core__mtd_accommodation_segmentation
|
||||
description: |
|
||||
This model contains the historic information regarding the customer segmentation based on active accommodations,
|
||||
also known as listings. This model depends on the int_core__mtd_accommodation_lifecycle, thus the time granularity
|
||||
is the same as for any mtd model.
|
||||
|
||||
The segmentation is applied at deal level, not at user host level. This has the drawback that hosts without a
|
||||
deal assigned won't be considered in this segmentation. However, it correctly categorises customers based on the
|
||||
number of listings across the different user hosts each deal can have.
|
||||
|
||||
The segmentation is available in the field active_accommodations_per_deal_segmentation. It considers listings that
|
||||
have been booked within the last 12 months. Thus, it means it only considers the lifecycle states of
|
||||
03-First Time Booked, 04-Active and 07-Reactivated. The segments are the following:
|
||||
- '0'
|
||||
- '01-05'
|
||||
- '06-20'
|
||||
- '21-60'
|
||||
- '61+'
|
||||
These segments are inspired from the ones RevOps team uses, but the associated deals and listings volume will differ
|
||||
since the listing activity logic considered is different.
|
||||
|
||||
deprecation_date: 2024-11-30
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- date
|
||||
- id_deal
|
||||
|
||||
columns:
|
||||
- name: date
|
||||
data_type: date
|
||||
description: The date for the month-to-date. Information is inclusive to the date displayed.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_deal
|
||||
data_type: character varying
|
||||
description: Id of the deal associated to the host.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: active_accommodations_per_deal_segmentation
|
||||
data_type: character varying
|
||||
description: The segmentation based on the number of listings booked in the last 12 months.
|
||||
tests:
|
||||
- not_null
|
||||
- accepted_values:
|
||||
values:
|
||||
- "0"
|
||||
- "01-05"
|
||||
- "06-20"
|
||||
- "21-60"
|
||||
- "61+"
|
||||
|
||||
- name: accommodations_booked_in_12_months
|
||||
data_type: integer
|
||||
description: Informative field of the actual number of listings booked in the last 12 months
|
||||
|
||||
- name: int_core__check_in_cover_users
|
||||
description:
|
||||
This model contains information about hosts that offer check in cover.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue