diff --git a/models/reporting/general/new_dash_booking_summary.sql b/models/reporting/general/new_dash_booking_summary.sql index 4f6683a..88964f0 100644 --- a/models/reporting/general/new_dash_booking_summary.sql +++ b/models/reporting/general/new_dash_booking_summary.sql @@ -16,6 +16,9 @@ select b.booking_created_date_utc as booking_created_date_utc, b.booking_check_in_date_utc as booking_check_in_date_utc, b.booking_check_out_date_utc as booking_check_out_date_utc, + date_trunc('month', b.booking_created_date_utc)::date as booking_created_month, + date_trunc('month', b.booking_check_in_date_utc)::date as booking_check_in_month, + date_trunc('month', b.booking_check_out_date_utc)::date as booking_check_out_month, b.booking_number_of_nights as booking_number_of_nights, b.host_currency_code as host_currency_code, b.new_dash_version as new_dash_version, diff --git a/models/reporting/general/schema.yml b/models/reporting/general/schema.yml index bd3fb05..0b9eb65 100644 --- a/models/reporting/general/schema.yml +++ b/models/reporting/general/schema.yml @@ -560,6 +560,29 @@ models: data_tests: - not_null + - name: booking_created_month + data_type: date + description: | + First day of the month of when the Booking record was + created in the Backend. Cannot be null. + data_tests: + - not_null + + - name: booking_check_in_month + data_type: timestamp + description: | + First day of the month of the Check-in of the Booking. + Cannot be null. + data_tests: + - not_null + + - name: booking_check_out_month + data_type: date + description: | + First day of the month of the Check-out of the Booking. + data_tests: + - not_null + - name: booking_number_of_nights data_type: integer description: |