From 083976b6f67301584c028b477aabfc6f16eb7523 Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Wed, 5 Feb 2025 15:31:42 +0100 Subject: [PATCH] adding number of days to complete verification --- models/intermediate/core/int_core__booking_details.sql | 6 ++++++ models/intermediate/core/schema.yml | 4 ++++ models/reporting/core/core__booking_details.sql | 1 + models/reporting/core/schema.yml | 4 ++++ 4 files changed, 15 insertions(+) diff --git a/models/intermediate/core/int_core__booking_details.sql b/models/intermediate/core/int_core__booking_details.sql index 1e7032b..bae56fe 100644 --- a/models/intermediate/core/int_core__booking_details.sql +++ b/models/intermediate/core/int_core__booking_details.sql @@ -82,6 +82,12 @@ select vr.is_verification_request_complete, vr.verification_estimated_started_date_utc, vr.verification_estimated_completed_date_utc, + case + when vr.is_verification_request_complete is true + then + vr.verification_estimated_completed_date_utc + - vr.verification_estimated_started_date_utc + end as days_complete_verification, vr.link_used_date_utc, b.verification_request_booking_source, pv.chose_deposit, diff --git a/models/intermediate/core/schema.yml b/models/intermediate/core/schema.yml index 5f017bb..c53149c 100644 --- a/models/intermediate/core/schema.yml +++ b/models/intermediate/core/schema.yml @@ -5125,6 +5125,10 @@ models: data_type: date description: "The estimated date on which the guest finished the guest journey." + - name: days_complete_verification + data_type: numeric + description: "Number of days it took to complete the verification." + - name: link_used_date_utc data_type: date description: "The date on which the guest used the link for the verification." diff --git a/models/reporting/core/core__booking_details.sql b/models/reporting/core/core__booking_details.sql index d76d0ed..c1a12a1 100644 --- a/models/reporting/core/core__booking_details.sql +++ b/models/reporting/core/core__booking_details.sql @@ -29,6 +29,7 @@ select verification_estimated_started_date_utc as verification_estimated_started_date_utc, verification_estimated_completed_date_utc as verification_estimated_completed_date_utc, + days_complete_verification as days_complete_verification, link_used_date_utc as link_used_date_utc, verification_request_booking_source as verification_request_booking_source, chose_deposit as chose_deposit, diff --git a/models/reporting/core/schema.yml b/models/reporting/core/schema.yml index 88dbe74..09a1023 100644 --- a/models/reporting/core/schema.yml +++ b/models/reporting/core/schema.yml @@ -1527,6 +1527,10 @@ models: data_type: date description: "The estimated date on which the guest finished the guest journey." + - name: days_complete_verification + data_type: numeric + description: "Number of days it took to complete the verification." + - name: link_used_date_utc data_type: date description: "The date on which the guest used the link for the verification."