Added nbr og nights to avoid calculation in PBI

This commit is contained in:
Joaquin Ossa 2024-12-12 11:27:48 +01:00
parent 85a02f8a1e
commit e18750d720
4 changed files with 16 additions and 0 deletions

View file

@ -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,

View file

@ -88,6 +88,13 @@ models:
tests:
- not_null
- name: number_of_nights
data_type: integer
description: Number of nights for the booking.
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.