Merged PR 3834: Added nbr of nights to avoid calculation in PBI
# Description Added nbr of nights to avoid calculation in PBI # 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. Added nbr og nights to avoid calculation in PBI Related work items: #25403
This commit is contained in:
commit
f2e5df0fa5
4 changed files with 16 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ select
|
|||
c.checkin_date_utc,
|
||||
c.checkin_time_utc,
|
||||
c.checkout_date_utc,
|
||||
c.checkout_date_utc - c.checkin_date_utc as number_of_nights,
|
||||
c.listing_name,
|
||||
c.listing_address,
|
||||
c.listing_address_line_2,
|
||||
|
|
|
|||
|
|
@ -88,6 +88,13 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: number_of_nights
|
||||
data_type: integer
|
||||
description: Number of nights for the reservation.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 1
|
||||
|
||||
- name: listing_name
|
||||
data_type: text
|
||||
description: Name of the listing associated with the check-in.
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ select
|
|||
checkin_date_utc as checkin_date_utc,
|
||||
checkin_time_utc as checkin_time_utc,
|
||||
checkout_date_utc as checkout_date_utc,
|
||||
number_of_nights as number_of_nights,
|
||||
listing_name as listing_name,
|
||||
listing_address as listing_address,
|
||||
listing_address_line_2 as listing_address_line_2,
|
||||
|
|
|
|||
|
|
@ -88,6 +88,13 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: number_of_nights
|
||||
data_type: integer
|
||||
description: Number of nights for the reservation.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_between:
|
||||
min_value: 1
|
||||
|
||||
- name: listing_name
|
||||
data_type: text
|
||||
description: Name of the listing associated with the check-in.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue