From 5d3f2f690810c23f51e167139b0430f034a86cf7 Mon Sep 17 00:00:00 2001 From: Joaquin Date: Wed, 19 Mar 2025 09:23:23 +0100 Subject: [PATCH] adding id_deal to api models --- .../check_in_hero/int_check_in_hero__checkins.sql | 1 + .../int_check_in_hero__user_monthly_fee.sql | 3 ++- models/intermediate/check_in_hero/schema.yml | 12 ++++++++++++ .../int_screen_and_protect__verification_fees.sql | 1 + ...int_screen_and_protect__verification_requests.sql | 1 + models/intermediate/screen_and_protect/schema.yml | 12 ++++++++++++ .../check_in_hero/check_in_hero__checkins.sql | 1 + .../check_in_hero__user_monthly_fee.sql | 1 + models/reporting/check_in_hero/schema.yml | 12 ++++++++++++ models/reporting/screen_and_protect/schema.yml | 12 ++++++++++++ .../screen_and_protect__verification_fees.sql | 1 + .../screen_and_protect__verification_requests.sql | 1 + 12 files changed, 57 insertions(+), 1 deletion(-) diff --git a/models/intermediate/check_in_hero/int_check_in_hero__checkins.sql b/models/intermediate/check_in_hero/int_check_in_hero__checkins.sql index f8ee194..867dee2 100644 --- a/models/intermediate/check_in_hero/int_check_in_hero__checkins.sql +++ b/models/intermediate/check_in_hero/int_check_in_hero__checkins.sql @@ -10,6 +10,7 @@ with select c.id_record, c.id_user_partner, + chu.id_deal, c.id_reservation, c.id_accommodation, chu.id_currency, diff --git a/models/intermediate/check_in_hero/int_check_in_hero__user_monthly_fee.sql b/models/intermediate/check_in_hero/int_check_in_hero__user_monthly_fee.sql index 56b957e..68856b9 100644 --- a/models/intermediate/check_in_hero/int_check_in_hero__user_monthly_fee.sql +++ b/models/intermediate/check_in_hero/int_check_in_hero__user_monthly_fee.sql @@ -5,6 +5,7 @@ with select id_user_partner, + id_deal, extract('year' from created_date_utc) as year, extract('month' from created_date_utc) as month, id_currency, @@ -15,4 +16,4 @@ select company_name, user_email from int_check_in_hero__checkins -group by 1, 2, 3, 4, 5, 9, 10 +group by 1, 2, 3, 4, 5, 6, 10, 11 diff --git a/models/intermediate/check_in_hero/schema.yml b/models/intermediate/check_in_hero/schema.yml index 78372ab..75c5e61 100644 --- a/models/intermediate/check_in_hero/schema.yml +++ b/models/intermediate/check_in_hero/schema.yml @@ -19,6 +19,12 @@ models: data_tests: - not_null + - name: id_deal + data_type: text + description: Identifier for the deal associated with the booking. + data_tests: + - not_null + - name: id_reservation data_type: text description: Unique identifier for the reservation associated with the check-in. @@ -211,6 +217,12 @@ models: data_tests: - not_null + - name: id_deal + data_type: text + description: Identifier for the deal associated with the booking. + data_tests: + - not_null + - name: year data_type: integer description: | diff --git a/models/intermediate/screen_and_protect/int_screen_and_protect__verification_fees.sql b/models/intermediate/screen_and_protect/int_screen_and_protect__verification_fees.sql index a5629e2..404eda0 100644 --- a/models/intermediate/screen_and_protect/int_screen_and_protect__verification_fees.sql +++ b/models/intermediate/screen_and_protect/int_screen_and_protect__verification_fees.sql @@ -255,6 +255,7 @@ select vr.id_verification, vr.id_booking, vr.id_user_partner, + vr.id_deal, vr.id_accommodation, vr.company_name, vr.is_protected, diff --git a/models/intermediate/screen_and_protect/int_screen_and_protect__verification_requests.sql b/models/intermediate/screen_and_protect/int_screen_and_protect__verification_requests.sql index 9fcdbd6..844a17b 100644 --- a/models/intermediate/screen_and_protect/int_screen_and_protect__verification_requests.sql +++ b/models/intermediate/screen_and_protect/int_screen_and_protect__verification_requests.sql @@ -9,6 +9,7 @@ select vr.id_verification, vr.id_booking, vr.id_user_partner, + spu.id_deal, vr.id_accommodation, spu.id_currency, spu.is_protected, diff --git a/models/intermediate/screen_and_protect/schema.yml b/models/intermediate/screen_and_protect/schema.yml index 2db290d..4629fb1 100644 --- a/models/intermediate/screen_and_protect/schema.yml +++ b/models/intermediate/screen_and_protect/schema.yml @@ -31,6 +31,12 @@ models: data_tests: - not_null + - name: id_deal + data_type: text + description: Identifier for the deal associated with the booking. + data_tests: + - not_null + - name: id_accommodation data_type: text description: Identifier for the accommodation related to the booking. @@ -374,6 +380,12 @@ models: data_tests: - not_null + - name: id_deal + data_type: text + description: Identifier for the deal associated with the booking. + data_tests: + - not_null + - name: id_accommodation data_type: text description: "Identifier for the accommodation related to the booking." diff --git a/models/reporting/check_in_hero/check_in_hero__checkins.sql b/models/reporting/check_in_hero/check_in_hero__checkins.sql index 2ba0b2e..265c48f 100644 --- a/models/reporting/check_in_hero/check_in_hero__checkins.sql +++ b/models/reporting/check_in_hero/check_in_hero__checkins.sql @@ -6,6 +6,7 @@ with select id_record as id_record, id_user_partner as id_user_partner, + id_deal as id_deal, id_reservation as id_reservation, id_accommodation as id_accommodation, guest_last_name as guest_last_name, diff --git a/models/reporting/check_in_hero/check_in_hero__user_monthly_fee.sql b/models/reporting/check_in_hero/check_in_hero__user_monthly_fee.sql index 944c23d..3577597 100644 --- a/models/reporting/check_in_hero/check_in_hero__user_monthly_fee.sql +++ b/models/reporting/check_in_hero/check_in_hero__user_monthly_fee.sql @@ -5,6 +5,7 @@ with select id_user_partner as id_user_partner, + id_deal as id_deal, year as year, month as month, id_currency as id_currency, diff --git a/models/reporting/check_in_hero/schema.yml b/models/reporting/check_in_hero/schema.yml index adda291..079bc5f 100644 --- a/models/reporting/check_in_hero/schema.yml +++ b/models/reporting/check_in_hero/schema.yml @@ -19,6 +19,12 @@ models: data_tests: - not_null + - name: id_deal + data_type: text + description: Identifier for the deal associated with the booking. + data_tests: + - not_null + - name: id_reservation data_type: text description: Unique identifier for the reservation associated with the check-in. @@ -171,6 +177,12 @@ models: data_tests: - not_null + - name: id_deal + data_type: text + description: Identifier for the deal associated with the booking. + data_tests: + - not_null + - name: year data_type: integer description: | diff --git a/models/reporting/screen_and_protect/schema.yml b/models/reporting/screen_and_protect/schema.yml index 6aa18df..c10b531 100644 --- a/models/reporting/screen_and_protect/schema.yml +++ b/models/reporting/screen_and_protect/schema.yml @@ -26,6 +26,12 @@ models: data_tests: - not_null + - name: id_deal + data_type: text + description: Identifier for the deal associated with the booking. + data_tests: + - not_null + - name: id_accommodation data_type: text description: Identifier for the accommodation related to the booking. @@ -277,6 +283,12 @@ models: data_tests: - not_null + - name: id_deal + data_type: text + description: Identifier for the deal associated with the booking. + data_tests: + - not_null + - name: id_accommodation data_type: text description: "Identifier for the accommodation related to the booking." diff --git a/models/reporting/screen_and_protect/screen_and_protect__verification_fees.sql b/models/reporting/screen_and_protect/screen_and_protect__verification_fees.sql index 6b01d86..c7ef9b5 100644 --- a/models/reporting/screen_and_protect/screen_and_protect__verification_fees.sql +++ b/models/reporting/screen_and_protect/screen_and_protect__verification_fees.sql @@ -6,6 +6,7 @@ select id_verification as id_verification, id_booking as id_booking, id_user_partner as id_user_partner, + id_deal as id_deal, id_accommodation as id_accommodation, is_protected as is_protected, protection_type as protection_type, diff --git a/models/reporting/screen_and_protect/screen_and_protect__verification_requests.sql b/models/reporting/screen_and_protect/screen_and_protect__verification_requests.sql index aed3acd..8415bf0 100644 --- a/models/reporting/screen_and_protect/screen_and_protect__verification_requests.sql +++ b/models/reporting/screen_and_protect/screen_and_protect__verification_requests.sql @@ -6,6 +6,7 @@ select id_verification as id_verification, id_booking as id_booking, id_user_partner as id_user_partner, + id_deal as id_deal, id_accommodation as id_accommodation, is_protected as is_protected, protection_type as protection_type,