Adds the following metrics: - Guest Journey with Payment - Guest Journey Payment Rate by both visions (global and by deal id) **Important**: it does not expose these metrics to the dashboard, this will be done after we have feedback from Ben R. on the paid GJ without GJ completeness. Missing steps to make them appear is to adapt `int_core__mtd_aggregated_metrics` and `int_core__monthly_aggregated_metrics_history_by_deal` and the respective reporting counterparts. It adapts: - `int_core__mtd_guest_journey_metrics` - `int_core__monthly_guest_journey_history_by_deal` the approaches are similar in the sense that we join with `int_core__verification_payments` and filter by a PAID status, that has been defined in the `dbt_project.yml` in a similar manner as we did with cancelled bookings. It can happen that the same verification request has multiple payments (see screenshot), which in this case we keep the first date in which the paid payment happens. The volume is quite low anyway.  code for the screenshot: ``` with pre as ( select id_verification_request, count(distinct icvp.id_payment) as total_paid_payments from intermediate.int_core__verification_payments icvp where icvp.payment_status = 'Paid' group by 1 ) select case when total_paid_payments > 2 then 'more than 2' when total_paid_payments = 2 then '2' when total_paid_payments = 1 then '1' end as payment_volume_category, count(1) as vr_volume from pre group by 1 order by 2 desc ``` I also added a missing reference in `schema.yaml` int about `int_core__mtd_guest_journey_metrics` Related work items: #18105 |
||
|---|---|---|
| .. | ||
| intermediate | ||
| reporting | ||
| staging | ||
| doc_blocks.md | ||