From 7330848ed03ffdce79d91f852530eeebe12156ef Mon Sep 17 00:00:00 2001 From: Joaquin Date: Tue, 1 Jul 2025 09:27:02 +0200 Subject: [PATCH 1/2] Update exposures gj ab test --- models/reporting/exposures.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/models/reporting/exposures.yml b/models/reporting/exposures.yml index eefb73b..334c3bb 100644 --- a/models/reporting/exposures.yml +++ b/models/reporting/exposures.yml @@ -593,3 +593,19 @@ exposures: owner: name: Oriol Roqué email: oriol.roque@superhog.com + + - name: ab_test_guest_journey_monitoring + label: AB Test Guest Journey Monitoring + type: notebook + maturity: medium + description: | + + A jupyter notebook that monitors the guest journey for AB testing purposes. + It analyzes the impact of different guest journey variations on key metrics such as conversion rate, payment rate and guest revenue per guest journey. + + depends_on: + - ref('int_core__ab_test_monitoring_guest_journey') + + owner: + name: Joaquin Ossa + email: joaquin.ossa@superhog.com From 9630001f01347d730c8c458c827e02b7471b8f73 Mon Sep 17 00:00:00 2001 From: Joaquin Date: Tue, 1 Jul 2025 09:59:36 +0200 Subject: [PATCH 2/2] new a/b test model in reporting and updated exposure --- models/intermediate/core/schema.yml | 16 --- ...core__ab_test_monitoring_guest_journey.sql | 19 ++++ models/reporting/core/schema.yml | 105 ++++++++++++++++++ models/reporting/exposures.yml | 2 +- 4 files changed, 125 insertions(+), 17 deletions(-) create mode 100644 models/reporting/core/core__ab_test_monitoring_guest_journey.sql diff --git a/models/intermediate/core/schema.yml b/models/intermediate/core/schema.yml index 9bce5bf..ac158d4 100644 --- a/models/intermediate/core/schema.yml +++ b/models/intermediate/core/schema.yml @@ -4174,12 +4174,6 @@ models: a bit of open possibilities for whenever we're analysing results later on. This is already materialised to avoid running long queries in the notebooks. - data_tests: - - dbt_utils.unique_combination_of_columns: - combination_of_columns: - - id_verification_request - - ab_test_name - columns: - name: id_verification_request data_type: integer @@ -4189,24 +4183,18 @@ models: can be part of none, one, or several A/B tests. In this table, a Verification Request or Guest Journey can only appear once per A/B test. Cannot be null. - data_tests: - - not_null - name: ab_test_name data_type: string description: | Name of the Guest Journey A/B test. It corresponds to the Feature Flag Name in the backend. Cannot be null. - data_tests: - - not_null - name: variation data_type: string description: | Identifier of the variation a given Verification Request is in, within a given Guest Journey A/B test. Cannot be null. - data_tests: - - not_null - name: first_appearance_at_utc data_type: timestamp @@ -4214,8 +4202,6 @@ models: Timestamp of the first Verification Request Feature Flag record created with the same verification request and A/B test name. Mostly for information purposes. Cannot be null. - data_tests: - - not_null - name: first_appearance_date_utc data_type: date @@ -4223,8 +4209,6 @@ models: Date of the first Verification Request Feature Flag record created with the same verification request and A/B test name. Mostly for information purposes. Cannot be null. - data_tests: - - not_null - name: verification_started_date_utc data_type: date diff --git a/models/reporting/core/core__ab_test_monitoring_guest_journey.sql b/models/reporting/core/core__ab_test_monitoring_guest_journey.sql new file mode 100644 index 0000000..0d86add --- /dev/null +++ b/models/reporting/core/core__ab_test_monitoring_guest_journey.sql @@ -0,0 +1,19 @@ +with + int_core__ab_test_monitoring_guest_journey as ( + select * from {{ ref("int_core__ab_test_monitoring_guest_journey") }} + ) +select + ab_test_name as ab_test_name, + variation as variation, + id_verification_request as id_verification_request, + first_appearance_at_utc as first_appearance_at_utc, + first_appearance_date_utc as first_appearance_date_utc, + verification_started_date_utc as verification_started_date_utc, + verification_completed_date_utc as verification_completed_date_utc, + experience_rating as experience_rating, + last_payment_paid_date_utc as last_payment_paid_date_utc, + guest_revenue_without_taxes_in_gbp as guest_revenue_without_taxes_in_gbp, + deposit_fees_without_taxes_in_gbp as deposit_fees_without_taxes_in_gbp, + waiver_fees_without_taxes_in_gbp as waiver_fees_without_taxes_in_gbp, + check_in_cover_fees_without_taxes_in_gbp as check_in_cover_fees_without_taxes_in_gbp +from int_core__ab_test_monitoring_guest_journey diff --git a/models/reporting/core/schema.yml b/models/reporting/core/schema.yml index c05cccf..f512266 100644 --- a/models/reporting/core/schema.yml +++ b/models/reporting/core/schema.yml @@ -2403,3 +2403,108 @@ models: be false as status only reflects the latest transition. data_tests: - not_null + + - name: core__ab_test_monitoring_guest_journey + description: | + Provides the Guest Journey A/B test key information to build metric monitoring on top. + + The purpose of this table is not to compute the metrics themselves, but rather leave + a bit of open possibilities for whenever we're analysing results later on. This is + already materialised to avoid running long queries in the notebooks. + + data_tests: + - dbt_utils.unique_combination_of_columns: + combination_of_columns: + - id_verification_request + - ab_test_name + + columns: + - name: id_verification_request + data_type: integer + description: | + Identifier of the Verification Request. Acts as foreign key to the Verification Request table. + It can be duplicated across different Feature Flags - meaning the same verification request + can be part of none, one, or several A/B tests. + In this table, a Verification Request or Guest Journey can only appear once per A/B test. + Cannot be null. + data_tests: + - not_null + + - name: ab_test_name + data_type: string + description: | + Name of the Guest Journey A/B test. It corresponds to the Feature Flag Name in the + backend. Cannot be null. + data_tests: + - not_null + + - name: variation + data_type: string + description: | + Identifier of the variation a given Verification Request is in, within a + given Guest Journey A/B test. Cannot be null. + data_tests: + - not_null + + - name: first_appearance_at_utc + data_type: timestamp + description: | + Timestamp of the first Verification Request Feature Flag record created + with the same verification request and A/B test name. Mostly for information + purposes. Cannot be null. + data_tests: + - not_null + + - name: first_appearance_date_utc + data_type: date + description: | + Date of the first Verification Request Feature Flag record created + with the same verification request and A/B test name. Mostly for information + purposes. Cannot be null. + data_tests: + - not_null + + - name: verification_started_date_utc + data_type: date + description: | + Date of when the Guest Journey was started. Can be null. + + - name: verification_completed_date_utc + data_type: date + description: | + Date of when the Guest Journey was completed. Can be null. + + - name: experience_rating + data_type: integer + description: | + CSAT score value for the Guest Journey. Can be null. + + - name: last_payment_paid_date_utc + data_type: date + description: | + Date of when the last paid payment on this Guest Journey + happened. Can be null. + + - name: guest_revenue_without_taxes_in_gbp + data_type: float + description: | + Total guest revenue paid without taxes in GBP, including Deposit + Fees, Waiver Fees and Check-In Cover fees. Can be null. + + - name: deposit_fees_without_taxes_in_gbp + data_type: float + description: | + Deposit fees revenue paid without taxes in GBP. + Can be null. + + - name: waiver_fees_without_taxes_in_gbp + data_type: float + description: | + Waiver fees revenue paid without taxes in GBP. + Can be null. + + - name: check_in_cover_fees_without_taxes_in_gbp + data_type: float + description: | + Check-in Cover fees revenue paid without taxes in GBP. + Can be null. diff --git a/models/reporting/exposures.yml b/models/reporting/exposures.yml index 334c3bb..f2feffd 100644 --- a/models/reporting/exposures.yml +++ b/models/reporting/exposures.yml @@ -604,7 +604,7 @@ exposures: It analyzes the impact of different guest journey variations on key metrics such as conversion rate, payment rate and guest revenue per guest journey. depends_on: - - ref('int_core__ab_test_monitoring_guest_journey') + - ref('core__ab_test_monitoring_guest_journey') owner: name: Joaquin Ossa