addressed Pablo's comments, removed the repetitive casts, added some nut_null tests and fixed some of the names and descriptions discrepancies

This commit is contained in:
Joaquin Ossa 2024-08-29 14:25:00 +02:00
parent ad2eb2544c
commit 6adc424963
6 changed files with 96 additions and 48 deletions

View file

@ -19,9 +19,11 @@ models:
data_type: text
description: "unique Superhog generated id for a booking"
- name: id_user_host
- name: id_user_partner
data_type: text
description: "unique Superhog generated id for host"
description: "unique Superhog generated id for partner"
tests:
- not_null
- name: id_accommodation
data_type: text
@ -56,7 +58,7 @@ models:
description: "short explanation for status"
- name: nightly_fee_local
data_type: text
data_type: double precision
description: "fee charged per night"
- name: number_nights
@ -83,10 +85,18 @@ models:
data_type: timestamp without time zone
description: "Timestamp of checkin for the booking"
- name: checkin_date_utc
data_type: date
description: "Timestamp of checkin for the booking"
- name: checkout_at_utc
data_type: timestamp without time zone
description: "Timestamp of checkout for the booking"
- name: checkout_date_utc
data_type: date
description: "Timestamp of checkout for the booking"
- name: is_cancelled
data_type: boolean
description: ""
@ -184,19 +194,19 @@ models:
combination_of_columns:
- year_month_created
- year_month_checkout
- id_user_host
- id_user_partner
columns:
- name: id_user_partner
data_type: text
description: "unique id value for user partner"
- name: year_month_created
data_type: text
description: "first day of month of created date"
description: "year and month of created date"
- name: year_month_checkout
data_type: text
description: "first day of month of check-out date"
- name: id_user_host
data_type: text
description: "unique id value for user host"
description: "year and month of check-out date"
- name: bookings_per_month
data_type: bigint
@ -210,6 +220,12 @@ models:
data_type: numeric
description: "ratio of cancelled bookings over total bookings"
- name: is_cancellation_threshold_surpassed
data_type: boolean
description: "true if the cancellation ratio is higher than the set threshold"
tests:
- not_null
- name: sum_cancelled_fee
data_type: numeric
description: "sum of fees charged for cancelled bookings