Merged PR 5582: Update exposures gj ab test

# Description

Update exposures to include Guest Journey A/B test notebook
Created a new A/B test monitoring model in reporting.
Removed tests of the intermediate model so we don't have duplicated tests since it is basically the same model in reporting

# Checklist

- [x] The edited models and dependants run properly with production data.
- [x] The edited models are sufficiently documented.
- [x] The edited models contain PK tests, and I've ran and passed them.
- [ ] I have checked for DRY opportunities with other models and docs.
- [ ] I've picked the right materialization for the affected models.

# Other

- [ ] Check if a full-refresh is required after this PR is merged.

Update exposures gj ab test

Related work items: #31448
This commit is contained in:
Joaquin Ossa 2025-07-01 08:19:53 +00:00
commit 7bf9168796
4 changed files with 140 additions and 16 deletions

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -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('core__ab_test_monitoring_guest_journey')
owner:
name: Joaquin Ossa
email: joaquin.ossa@superhog.com