Commit graph

1668 commits

Author SHA1 Message Date
Oriol Roqué Paniagua
3c99c4f8bc Merged PR 4504: Onboarding MRR + Visualisation changes
# Description

Changes:
* Adds Onboarding MRR
* Refactors exclusion code for ongoing month / invoicing cycle
* Adds sign format on relative differences

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

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

Related work items: #27609, #27805
2025-02-25 14:05:54 +00:00
Joaquin Ossa
03955aadd5 Finished schema 2025-02-25 14:54:59 +01:00
Joaquin Ossa
4a6158df28 Added timestamp to a/b test model 2025-02-25 14:48:37 +01:00
Oriol Roqué Paniagua
995027205c Merged PR 4502: Revert "Adds Onboarding MRR"
# Description

_Describe your motivation and changes here._

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] 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.

Revert "Adds Onboarding MRR"

Reverted commit `dab210c6`.
2025-02-25 11:44:24 +00:00
Oriol Roqué Paniagua
7c4b0e752b Merged PR 4501: Revert "Refactor display exclusion for clarity purposes"
# Description

_Describe your motivation and changes here._

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] 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.

Revert "Refactor display exclusion for clarity purposes"

Reverted commit `fdec616f`.
2025-02-25 11:43:46 +00:00
Oriol Roqué Paniagua
5eebb4f560 Merged PR 4500: Revert "Relative increments with sign"
# Description

_Describe your motivation and changes here._

# Checklist

- [ ] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented.
- [ ] 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.

Revert "Relative increments with sign"

Reverted commit `f5718ded`.
2025-02-25 11:43:05 +00:00
uri
f5718ded4d Relative increments with sign 2025-02-25 12:30:23 +01:00
Joaquin Ossa
f036e626d7 Commit removed unnecessary fields 2025-02-25 12:19:45 +01:00
uri
fdec616fe6 Refactor display exclusion for clarity purposes 2025-02-25 11:45:14 +01:00
uri
dab210c607 Adds Onboarding MRR 2025-02-25 11:33:37 +01:00
Oriol Roqué Paniagua
a6671ee4d0 Merged PR 4493: Adds Revenue Churn Rate in YTD/MTD Overview
# Description

Changes:
* Adds Revenue Churn Rate in YTD/MTD Overview. This has several implications, I finally understood how to properly compute a YTD.

The problem is that Revenue Churn Rate is a % of the Total "Churned" Revenue in a 12 m period vs. the Total Revenue in the same 12 m period. This is a bit tricky because it's not really additive, because of the Churn definition. Total Churned Revenue is the Revenue that the churned deals in a month generated on that past 12 months prior to churning.

So - in order to aggregate it properly, we need to do the sum of the Total Churned Revenue and retrieve the Total Revenue on these 12 months, and THEN compute the Churn rate.

This PR mainly retrieves the necessary input from the Churn models and then follows a similar computation as for the rest of YTD/MTD converted metrics.

I'll handle Onboarding MRR in a separated PR as this one is quite dense already.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

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

Related work items: #27609, #27805
2025-02-25 09:41:28 +00:00
Joaquin Ossa
78d42462a8 Merged PR 4489: Update athena models to remove id_accommodation
# Description

Removed `id_accommodation` from athena models
I remembered why I had add it before, it was to unite it with the edeposit model with the same number of fields but I fixed it already

# 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 athena models to remove id_accommodation

Related work items: #27938
2025-02-25 08:32:45 +00:00
Oriol Roqué Paniagua
fdc8e2ae24 Merged PR 4491: Reduce metric name length to fit in PBI
# Description

Reduce metric name length to fit in PBI

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

Reduce metric name length to fit in PBI

Related work items: #27609
2025-02-24 16:40:01 +00:00
Joaquin Ossa
62316778fb updated schema 2025-02-24 16:35:10 +01:00
Joaquin Ossa
1d514cec3a Addressed comments 2025-02-24 16:27:16 +01:00
Joaquin Ossa
d7d3422eb9 Update athena models to remove id_accommodation 2025-02-24 15:21:44 +01:00
Joaquin Ossa
34f8fbe499 commit wip 2025-02-24 15:06:55 +01:00
Oriol Roqué Paniagua
85c2c73da7 Merged PR 4483: Adding targets (to be revised). Allows multi-year last-date computation
# Description

Changes:
* Adds template for targets -> These need to be revised
* Adds comparison of values vs. targets
* Allows for multi-year last date computation (allowing multiple years to be selected, not just the last one)

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

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

Related work items: #27609, #27805
2025-02-24 10:39:45 +00:00
Joaquin Ossa
cbed87404e Merged PR 4481: Updated tests on S&P fees
# Description

Silly me added some `tests` instead of `data_tests`

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

Updated tests on S&P fees
2025-02-24 10:38:03 +00:00
Joaquin Ossa
62c2e44b86 Deduplicated records 2025-02-24 10:57:46 +01:00
Joaquin Ossa
2e19678182 Final tests update 2025-02-23 16:39:43 +01:00
Joaquin Ossa
f29b67addd Updated tests on S&P fees 2025-02-23 16:14:42 +01:00
Joaquin Ossa
fb4775bd07 Updated tests 2025-02-23 16:11:37 +01:00
Joaquin Ossa
fc85dd9e70 Fixed data_types and added tests 2025-02-23 16:05:11 +01:00
Joaquin Ossa
d6dcbcc67e commit wip 2025-02-23 15:04:59 +01:00
Joaquin Ossa
f3842c950b commit wip 2025-02-22 19:55:30 +01:00
Joaquin Ossa
9704426dd6 commit wip 2025-02-22 14:16:41 +01:00
Joaquin Ossa
05adc07674 commit wip 2025-02-21 17:44:00 +01:00
Joaquin Ossa
1b853a9503 commit wip (id_incident duplicates have to check) 2025-02-21 16:40:53 +01:00
Joaquin Ossa
725f2a54c3 Staging model for resolution incidents 2025-02-21 15:25:24 +01:00
Oriol Roqué Paniagua
8cf7393173 Merged PR 4471: Visualisation changes
# Description

Adapts YTD/MTD for visualisation purposes

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

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

Visualisation changes

Related work items: #27609
2025-02-20 18:43:26 +00:00
Joaquin Ossa
5942e4b81c Merged PR 4463: Update exposures
# Description

Update exposures of new and updated reports

# Checklist

- [x] The edited models and dependants run properly with production data.**dbt compile completed**
- [ ] The edited models are sufficiently documented.
- [ ] 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
2025-02-20 13:43:21 +00:00
Joaquin Ossa
aed9ce5575 Update exposures 2025-02-20 14:33:58 +01:00
Joaquin Ossa
f28db85968 Merged PR 4455: Added has_verification_request
# Description

Added has_verification_request for New Dash report

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

Added has_verification_request

Related work items: #27787
2025-02-19 15:39:04 +00:00
Joaquin Ossa
b35d9b0a00 Addressed comments 2025-02-19 16:37:40 +01:00
Joaquin Ossa
c710de7117 Added has_verification_request 2025-02-19 16:00:33 +01:00
Joaquin Ossa
361342af98 Merged PR 4454: Added listings data
# Description

I had to include new fields on the model since Power BI couldn't handle 1 join, apparently it was too much data for it

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

Added listings data

Related work items: #27771
2025-02-19 14:32:18 +00:00
Joaquin Ossa
a94fb760e5 new booking fields 2025-02-19 15:29:05 +01:00
Joaquin Ossa
6fce8c0ec6 Added listings data 2025-02-19 14:57:44 +01:00
Joaquin Ossa
5585880b63 Merged PR 4448: Added booking id to payments model
# Description

Added booking id to payments model to upgrade payments report

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

Added booking id to payments model

Related work items: #27771
2025-02-19 10:59:13 +00:00
Joaquin Ossa
7b8af0f2ab Merged PR 4446: PMS model
# Description

New PMS model for PMS report in Legacy
This model shows the currently active PMS association for each host, with some basic host information, the amount of bookings done through this PMS and number of listings associated with the host.
**To be confirmed with someone more knowledgeable than me**

# 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.
- [x] I have checked for DRY opportunities with other models and docs.
- [x] I've picked the right materialization for the affected models.

# Other

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

Related work items: #27702
2025-02-19 10:58:58 +00:00
Joaquin Ossa
23393673b5 renamed field 2025-02-19 11:57:58 +01:00
Joaquin Ossa
533baa76c4 Added booking id to payments model 2025-02-19 11:53:19 +01:00
Joaquin Ossa
f994b5766e Renamed 2025-02-19 10:56:43 +01:00
Oriol Roqué Paniagua
78ae3e0119 Merged PR 4444: Exposes ytd_mtd_aggregated_main_metrics_overview
# Description

Exposes ytd_mtd_aggregated_main_metrics_overview in reporting.

I changed a bit the logic for exclusion, I believe this is a bit more clear than how it's currently done for the mtd/monthly metrics.

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

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

Related work items: #27609
2025-02-19 09:26:05 +00:00
Joaquin Ossa
e9c0fa3ed0 Updated tests 2025-02-19 09:08:21 +01:00
Joaquin Ossa
74b045a930 New PMS model 2025-02-19 08:59:49 +01:00
Oriol Roqué Paniagua
7260368bad Merged PR 4443: First version of the aggregated model for YTD/MTD Overview
# Description

First version of the model int_ytd_mtd_aggregated_main_metrics_overview

It aggregates data at the level of:
* Date
* Dimension
* Dimension Value
* Metric Name (or Id Metric)

This computes differences and relative differences in:
* current MTD vs previous month EOM
* current MTD vs previous year MTD
* current year YTD vs previous year YTD

This is applied to 13 metrics, namely:
* Total Revenue
* Revenue Retained Post-Resolutions
* Guest Revenue
* Invoiced Operator Revenue
* Invoiced APIs Revenue
* Billable Bookings
* Live Deals
* New Deals
* Churning Deals
* Damage Waiver Payout Rate
* Host Resolutions Payout Rate
* Invoiced Operator Revenue per Billable Booking
* Waiver Revenue per Billable Booking

This still does not handle:
* Comparison vs. targets (to be done later, need input)
* Missing metrics on Onboarding MRR / Revenue Churn (to be done later)
* Invoicing dependant data exclusion (to be done 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models. **At the moment I keep everything as views and seems ok. We'll see if this needs to be materialised as tables later on**

# Other

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

Related work items: #27609
2025-02-18 15:45:24 +00:00
Oriol Roqué Paniagua
073620bd3d Merged PR 4439: First version of int_ytd_mtd_main_metrics_overview
# Description

New model for the purpose of Main KPIs - Overview.

It computes:
* Current MTD value
* Previous Month EOM value
* Previous Year MTD value (12 months ago)
* Current YTD value
* Previous Year YTD value

for the metrics:
* Total Revenue
* Revenue Retained Post-Resolutions
* Guest Revenue
* Invoiced Operator Revenue
* Invoiced APIs Revenue
* Host Resolutions Amount Paid
* Damage Host Waiver Payments
* Billable Bookings
* New Deals
* Churning Deals
* Live Deals (dedicated logic handling)
* Waiver Revenue

Additionally it properly computes the following derived metrics:
* Waiver Payout Rate
* Resolutions Payout Rate
* Operator Revenue per Billable Booking
* Waiver Revenue per Billable Booking

Only for dimension = 'global', though should be easy to extend to other dimensions.

This does not handle (yet) Onboarding MRR nor Revenue Churn Rate, mostly because I need to think how this can be properly attributed in a YTD basis.
This does not compute variations (abs. diff. or rel. diff.) yet.
This does not handle the "hiding" of invoicing metrics due to the invoicing cycle yet.
This does not handle targets... yet!

# 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.
- [X] I have checked for DRY opportunities with other models and docs.
- [X] I've picked the right materialization for the affected models.

# Other

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

Related work items: #27609
2025-02-18 14:30:12 +00:00
Joaquin Ossa
6e26a2a761 Merged PR 4438: decimals issue with currency exchange rate
# Description

Fixing decimals issue with currency exchange rate

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

decimals issue with currency exchange rate

Related work items: #27645
2025-02-18 13:33:03 +00:00