From c710de7117631dcdd09bcc5d86f7a470f2f696c5 Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Wed, 19 Feb 2025 16:00:33 +0100 Subject: [PATCH] Added has_verification_request --- .../core/int_core__booking_summary.sql | 3 +++ models/intermediate/core/schema.yml | 8 ++++++++ .../reporting/general/new_dash_booking_summary.sql | 2 ++ models/reporting/general/schema.yml | 14 ++++++++++++++ 4 files changed, 27 insertions(+) diff --git a/models/intermediate/core/int_core__booking_summary.sql b/models/intermediate/core/int_core__booking_summary.sql index a20eeb7..abd5175 100644 --- a/models/intermediate/core/int_core__booking_summary.sql +++ b/models/intermediate/core/int_core__booking_summary.sql @@ -10,6 +10,9 @@ with select bts.id_booking, bts.id_verification_request, + case + when bts.id_verification_request is null then false else true + end as has_verification_request, bts.id_accommodation, bts.id_user_product_bundle, bts.id_deal, diff --git a/models/intermediate/core/schema.yml b/models/intermediate/core/schema.yml index 5f6380f..16b4f24 100644 --- a/models/intermediate/core/schema.yml +++ b/models/intermediate/core/schema.yml @@ -4033,6 +4033,14 @@ models: The identifier of the verification request. It acts as Foreign Key to Verification Request table. It can be null. + - name: has_verification_request + data_type: boolean + description: | + Flag to identify if the booking has a verification request or not. + Cannot be null. + data_tests: + - not_null + - name: id_accommodation data_type: bigint description: diff --git a/models/reporting/general/new_dash_booking_summary.sql b/models/reporting/general/new_dash_booking_summary.sql index 3aa455a..0fb98a4 100644 --- a/models/reporting/general/new_dash_booking_summary.sql +++ b/models/reporting/general/new_dash_booking_summary.sql @@ -5,6 +5,8 @@ with select b.id_booking as id_booking, + b.id_verification_request as id_verification_request, + b.has_verification_request as has_verification_request, b.id_deal as id_deal, d.main_deal_name as main_deal_name, hd.deal_name as hubspot_deal_name, diff --git a/models/reporting/general/schema.yml b/models/reporting/general/schema.yml index f44e260..c4241c8 100644 --- a/models/reporting/general/schema.yml +++ b/models/reporting/general/schema.yml @@ -1250,6 +1250,20 @@ models: - not_null - unique + - name: id_verification_request + data_type: bigint + description: + The identifier of the verification request. It acts as Foreign Key to + Verification Request table. It can be null. + + - name: has_verification_request + data_type: boolean + description: | + Flag to identify if the booking has a verification request or not. + Cannot be null. + data_tests: + - not_null + - name: id_deal data_type: string description: |