Commit graph

963 commits

Author SHA1 Message Date
Joaquin
2a797ce0e8 New dash bookings agg models 2025-04-02 12:04:26 +02:00
Joaquin
fb2b2def52 New created bookings with services model 2025-04-02 12:04:26 +02:00
Oriol Roqué Paniagua
ce723b335e Merged PR 4878: Adds Monthly/MTD and Aggregated/Metric models for Total and Retained Revenue
# Description

Adds 4 models for Total and Retained Revenue:
* 2 Metric models on Monthly and MTD
* 2 Aggregated models on Monthly and MTD

This follows the standard for KPIs. First manual checks vs data look ok, although I'll run the proper test analysis with the dbt audit tool in the next PR when merging into the current production tables.

# 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: #28946
2025-04-02 08:53:49 +00:00
Oriol Roqué Paniagua
0b75afbe39 Merged PR 4882: Fix Business Targets
# Description

Fixes Blank stuff

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

Fix Business Targets

Related work items: #28958
2025-04-02 07:32:11 +00:00
uri
547069ede0 Adds Monthly/MTD and Aggregated/Metric models for Total and Retained Revenue 2025-04-01 17:41:56 +02:00
Joaquin Ossa
7a09fd344d Merged PR 4875: Adding total_listings_with_active_product_bundle_with_paid_service
# Description

Adding total_listings_with_active_product_bundle_with_paid_service which weirdly enough it was already on the schemas but not in the model.
This is the same value that's going to be displayed on the new offered services tab

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

Adding total_listings_with_active_product_bundle_with_paid_service

Related work items: #28640
2025-04-01 14:04:32 +00:00
Oriol Roqué Paniagua
adcb8d2231 Merged PR 4874: Daily model for Total and Retained Revenue
# Description

Daily model for Total and Retained Revenue metrics.

I opted for keeping both Total Revenue alongside of Revenue Retained and Revenue Retained Post-Resolutions within the same model.

Please, verify that you're happy with the naming of `total_and_retained_revenue`, before continuing with the usual monthly/mtd metric/aggregated models.

# 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: #28946
2025-04-01 13:44:30 +00:00
Joaquin
9750fa9e14 Adding total_listings_with_active_product_bundle_with_paid_service 2025-04-01 15:37:41 +02:00
Joaquin
b4a4925bc1 removed test of not_null 2025-03-31 12:10:26 +02:00
Joaquin
454d7648f6 Fixed weekly and monthly granularity 2025-03-28 11:53:32 +01:00
Joaquin Ossa
e4fb1af349 Merged PR 4833: Added current deal lifecycle to new dash overview
# Description

Added current deal lifecycle to new dash overview

# 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 current deal lifecycle to new dash overview

Related work items: #28873
2025-03-28 08:20:58 +00:00
Joaquin
b138e0c626 Added boolean 2025-03-28 09:02:12 +01:00
Joaquin
3833f3e92d Added current deal lifecycle to new dash overview 2025-03-27 17:56:36 +01:00
Joaquin
7696585a6b third fix 2025-03-27 16:41:11 +01:00
Joaquin
684c233ff9 second fix 2025-03-27 16:30:22 +01:00
Joaquin
d353e852cd Fixing model 2025-03-27 14:38:53 +01:00
Joaquin
c902ae2dff Commit wip test 2025-03-27 14:27:38 +01:00
Joaquin
6287b57171 Addressed comments 2025-03-27 12:31:52 +01:00
Joaquin
83dd419e19 Aggregated models 2025-03-27 11:40:08 +01:00
Joaquin
9d99fd6088 commit wip 2025-03-27 11:37:15 +01:00
Joaquin
6dcc32b907 Commit wip 2025-03-27 11:37:15 +01:00
Joaquin
d0bc64b868 commit wip 2025-03-27 11:37:15 +01:00
Joaquin
2e984aa61b fixed tests 2025-03-27 11:37:15 +01:00
Joaquin
18988eadde Committing for testing 2025-03-27 11:37:15 +01:00
Joaquin
c60bfc6ccb Addressed comments 2025-03-27 11:24:17 +01:00
Joaquin
3f08229256 New Dash Listings with services 2025-03-26 17:01:23 +01:00
Joaquin
87517f6a92 Listings offered services 2025-03-26 10:25:14 +01:00
Joaquin
525c12dc83 Commit wip 2025-03-26 10:25:14 +01:00
Joaquin
d229845b00 changes tested 2025-03-26 10:19:49 +01:00
Joaquin
50650776fc last check 2025-03-26 10:17:41 +01:00
Joaquin
20a277037d Addressed comment 2025-03-26 10:10:51 +01:00
Joaquin
90581ea142 Addressed comments 2025-03-25 17:29:55 +01:00
Joaquin
20a8958679 Commit wip 2025-03-25 17:11:02 +01:00
Joaquin
2c5301c158 commit wip 2025-03-25 12:26:11 +01:00
Joaquin
721f3e4e9e Addressed comments 2025-03-25 12:26:11 +01:00
Joaquin
1ebd1c5ccb Created new kpi daily model for new dash users 2025-03-25 12:26:11 +01:00
Joaquin
c0a1e90fae Improved New Dash Services usage 2025-03-25 12:26:11 +01:00
Oriol Roqué Paniagua
fae7572777 Merged PR 4782: Dashboard, Pricing and Services from Hubspot
# Description

Brings 3 new properties from HubSpot - Deals:
* Dashboard Type: Old Dash, New Dash or null
* Pricing Structure: this contains several possibilities, such as new pricing v1, v2, old pricing (legacy), api pricing, etc.
* Partnership Services: what services the client has according to Hubspot. Not the best in terms of quality but better than nothing specially in Old Dash. I also handled a small processing since services were differently separated.

This is propagated to intermediate in `int_hubspot__deal`. This is needed to automate the pricing differences for clients in old dash to be moved to new dash.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [X] The edited models are sufficiently documented. **Mostly on intermediate, did not bother to update staging besides the new fields.**
- [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: #28627
2025-03-24 11:20:03 +00:00
Oriol Roqué Paniagua
8924778a52 Merged PR 4770: Same freshness in MTD and YTD/target for Resolutions Payouts
# Description

Ensures Resolutions Payouts (in amount paid) is timely

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

Same freshness in MTD and YTD/target for Resolutions Payouts

Related work items: #28560
2025-03-21 11:10:26 +00:00
Pablo Martín
36e6a35d12 Merged PR 4753: Add sqlfluff check
# Description

Adds another check to CI that validates that compiled SQL is valid.

Related work items: #28628
2025-03-21 10:10:44 +00:00
Oriol Roqué Paniagua
98c40d21d2 Merged PR 4769: Refactors display exclusion in main metrics
# Description

I noticed this morning that after the name changes some exclusions have been messed up.

I think is about time we handle this properly. Following what we did for `ytd_mtd_aggregated_main_metrics_overview`, I apply the same logic: the metric display configuration is handled for each metric in the configuration rather than by some crazy-complex-name-logic.

I also took the opportunity to make Host Resolutions timely after a discussion with Chloe yesterday. Finance handles resolutions payments twice a week, and the "delay" in time is mostly coming from Resolutions accepting to pay someone vs. Finance handling the payment. In any case we're talking about a few days maximum difference, which I believe it's 1) process-related freshness, rather than data-related and 2) much better to have visibility in a timely manner rather than waiting for the 20th on next month.

# 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. **Logic is common among YTD and MTD models. At some moment this can be improved**
- [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: #28560
2025-03-21 09:40:20 +00:00
Oriol Roqué Paniagua
240d6ec59e Merged PR 4763: Align metrics within KPIs report
# Description

There's misalignment in the different areas in the business, but even within our own report...

**I'm not saying this is perfect** - but at least it forces a common Data Glossary within Main KPIs. I'd suggest later on reviewing naming - same as we need to do for revenue anyway -, but for the meantime, at least have consistency on our side.

Changes:
* Est. Billable Bookings -> Billable Bookings. We have other metrics stated as Estimated in the Data Glossary.
* Waiver and Resolutions payments to host are now called Payouts. This is not perfect but at least is clear we're paying out, so it's a cost.
* Host Resolutions Payment Rate is now explicitly mentioning how it's being computed to avoid confusion with the Payout Rate, that does not appear here yet, but appears in the YTD.

Additional Changes:
* Tests are also aligned with new names.
* Re-order booking display, so Cancelled Bookings (inclusion and exclusion) are shown below. Having them the first is weird.

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

Related work items: #28560
2025-03-20 17:00:36 +00:00
Pablo Martin
6a38a4ec48 modify ugly name 2025-03-20 17:03:13 +01:00
Oriol Roqué Paniagua
6b9434355a Merged PR 4759: Adds Booking Fee per Billable Booking
# Description

Changes:
* Creates Booking Fees in YTD/MTD
* Creates Booking Fees per Billable Booking in YTD/MTD. This is exposed forward.
* Removes code for Onboarding MRR in YTD/MTD.

Additional fixes:
* Small mistake - Revenue Churn is now considered as NEGATIVE

# 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: #28560
2025-03-20 16:01:27 +00:00
Oriol Roqué Paniagua
098ab51439 Merged PR 4757: Creates a Total Booking Fees metric (Old dash + New dash)
# Description

Main Changes:
* Computes the total booking fees in `int_kpis__metric_daily_invoiced_revenue`
* Propagates within KPIs, including schema and tests
* Propagates within cross in both "by deal" and "by dimension/global"
* Propagates to main kpis tests

Small fix:
* In `int_mtd_vs_previous_year_metrics`, manual formatting because sqlfmt is broken on this model...

# 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: #28560
2025-03-20 13:45:44 +00:00
Oriol Roqué Paniagua
93b31854f7 Merged PR 4754: Updates targets FY25 & FY26
# Description

Main changes:
* Modifies target seeds to include FY2025 and FY2026. This includes now absolute values for equivalent rate metrics. This also includes Booking Fees per Billable Booking, despite this metric is still not computed. This will be done in a separated PR.
* Removes Onboarding MRR as this requirement is no longer needed, and there has not been any target computed for this metric. This is modified to include Revenue Churn as an absolute figure.

Small note. Targets for FY 2025 rely on the actuals from Finance. Up to January 2025 included, these should match with our YTD values, but it's not the case due to small differences in Billable Bookings / Deals; as well as accrued revenue. Accrued revenue is very troublesome specially on Guesty side, since this affects Total Revenue, and this affects also Resolutions Payout Rate, and so on...

# 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: #28560
2025-03-20 13:10:22 +00:00
Joaquin Ossa
9e59fa4933 Merged PR 4723: Adding id_deal
# Description

Added `id_deal` to edeposit models for Invoice 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

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

Adding id_deal

Related work items: #28239
2025-03-19 15:50:37 +00:00
Joaquin
bcdb39849d Addressed comments 2025-03-19 12:06:05 +01:00
Joaquin Ossa
cef363847a Merged PR 4736: adding id_deal to api models
# Description

Adding `id_deal` to API models in Check in Cover and Screen & Protect

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

Related work items: #28239
2025-03-19 10:33:49 +00:00
Joaquin
5d3f2f6908 adding id_deal to api models 2025-03-19 09:23:23 +01:00