Commit graph

1693 commits

Author SHA1 Message Date
Joaquin Ossa
25a89208c4 Addressed comments 2025-02-07 15:15:17 +01:00
Joaquin Ossa
1c6f23f269 fix commit 2025-02-07 12:40:22 +01:00
Joaquin Ossa
78e005e8fa New dash service usage model 2025-02-07 12:37:32 +01:00
Oriol Roqué Paniagua
167261b9ee Merged PR 4314: Remove reporting booking cancelled
# Description

Removes from reporting on monthly by deal cancelled bookings.
I'll do this at the same time to update PBI accordingly.

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

Remove reporting booking cancelled

Related work items: #24637
2025-02-07 10:59:21 +00:00
Joaquin Ossa
1a7579c8a8 Commit wip 2025-02-07 08:34:20 +01:00
Oriol Roqué Paniagua
fe3a5c9fe9 Merged PR 4309: Cancelled Bookings KPIs rework
# Description

Exposes new metrics:
* Created Bookings (Excl. Cancelled)
* Cancelled Created Bookings
* Check Out Bookings (Excl. Cancelled)
* Cancelled Check Out Bookings

Re-naming of existing metrics:
* Created Bookings -> Total Created Bookings
* Checkout Bookings -> Total Check Out Bookings

Removes exposure of previous Cancelled Bookings. In the monthly by deal model, it's hardcoded still - need to change PBI to remove safely. This will be done later on once we remove the Cancelled Bookings models.

Adapts the existing tests on KPIs to accommodate for the changes by including new metrics. Also, I've set the detector to 5 (from 8) since it's been a while this has not triggered thus might be worth the effort to have more detection capabilities.

# 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: #24637
2025-02-06 15:12:35 +00:00
Oriol Roqué Paniagua
cc86565b02 Merged PR 4304: Adds Cancelled and Not Cancelled Created Bookings
# Description

First commit - should be an exact replica of the previous PR on Check-Out:

Adds Cancelled and Not Cancelled Created Bookings as absolute figures. Adds Cancellation Rate only for aggregated models.
I also added the removal of duplicate bookings. Otherwise the rates might be affected, and this should be cleaner anyway.

Second commit:
Small changes on the unique key description of the model for check-out, doesn't impact the model output.

# 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: #24637
2025-02-06 13:13:02 +00:00
Oriol Roqué Paniagua
736d615075 Merged PR 4303: Adds Cancelled and Not Cancelled Check-out Bookings
# Description

Adds Cancelled and Not Cancelled Check-Out Bookings as absolute figures. Adds Cancellation Rate only for aggregated models.

Edit: I also added the removal of duplicate bookings. Otherwise the rates might be affected, and this should be cleaner anyway. Will do the same for Created Bookings.

This won't make these new metrics appear in KPIs.

# 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: #24637
2025-02-06 12:01:24 +00:00
Oriol Roqué Paniagua
b569db3468 Merged PR 4298: Split Check-Out bookings by Dash Source
# Description

Adds new category Dash Source for Check-Out bookings KPIs

# 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: #27356
2025-02-06 10:53:24 +00:00
Oriol Roqué Paniagua
85fa58f5a9 Merged PR 4287: Bugfix - Ensure exclusion of test account at where condition
# Description

The condition on the left join created some records with null info from user host thus raising errors.
This is now fixed by ensuring these get excluded after the join

# Checklist

- [X] The edited models and dependants run properly with production data.
- [ ] 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: #27319
2025-02-05 15:54:19 +00:00
Joaquin Ossa
3919539786 Merged PR 4283: adding number of days to complete verification
# Description

Adding number of days to complete verification

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

adding number of days to complete verification

Related work items: #27178
2025-02-05 15:07:25 +00:00
Joaquin Ossa
45dc52a657 renamed 2025-02-05 16:06:29 +01:00
Joaquin Ossa
083976b6f6 adding number of days to complete verification 2025-02-05 15:31:42 +01:00
Joaquin Ossa
961c4e6fdd Merged PR 4274: Model for Bookings report in Legacy
# Description

New model for bookings report in Legacy
It contains details on bookings, hosts, guests, verification request and selected payment validation (No options since we don't have that data)

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

Model for Bookings report in Legacy

Related work items: #27178
2025-02-05 13:22:24 +00:00
Joaquin Ossa
8e76e3e8cc changed name 2025-02-05 14:21:59 +01:00
Joaquin Ossa
fa9622721b added friendly name 2025-02-05 12:41:30 +01:00
Joaquin Ossa
4718990efb fixed reference call 2025-02-05 12:05:24 +01:00
Joaquin Ossa
ff296ec75d Model for Bookings report in Legacy 2025-02-05 11:53:28 +01:00
Oriol Roqué Paniagua
233d2f7590 Merged PR 4271: Adapts test account logic + New Dash exclusion
# Description

Changes:
* Adapts the consideration for a test account in unified_user. Now, if a user domain is superhog.com, truvi.com or guardhog.com these accounts will also be considered as test accounts.
* Excludes test accounts for New Dash reporting in the 3 source models.

KPIs exclusions will be done in a separated PR.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [ ] 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.
- [ ] 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: #27319
2025-02-05 09:51:30 +00:00
Oriol Roqué Paniagua
f76e49a75c Merged PR 4253: Update exposures for Invoicing and Crediting
# Description

Update exposures for Invoicing and Crediting by including the new model.

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

Related work items: #26618
2025-02-03 11:19:52 +00:00
Joaquin Ossa
2592f187f2 Merged PR 4252: Listings report model
# Description

New model for Listings report in Legacy.
It contains basic accommodations data with some of the host and bookings

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

Listings report model

Related work items: #27178
2025-02-03 10:15:20 +00:00
Joaquin Ossa
3b6f6eed0a Listings report model 2025-02-03 10:37:25 +01:00
Oriol Roqué Paniagua
353972984e Merged PR 4236: Propagate contact name for reporting purposes only
# Description

Propagates contact name and id_deal + contact name combination for PBI in xero - sales monthly trends

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

Propagate contact name for reporting purposes only

Related work items: #26618
2025-01-31 09:53:54 +00:00
Joaquin Ossa
f55c618cfa Merged PR 4234: Fixed filter in mrr
# Description

Fixed filter in MRR metrics, now it only filters current 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.
- [ ] I've picked the right materialization for the affected models.

# Other

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

Fixed filter in mrr

Related work items: #27180
2025-01-31 09:40:25 +00:00
Joaquin Ossa
8fdabf1cb4 Fixed filter in mrr 2025-01-31 10:37:03 +01:00
Oriol Roqué Paniagua
68952223ca Merged PR 4228: First version of sales - monthly trends
# Description

New model that aggregates in a monthly basis the information from Xero sales. The aggregation is done by several categories, most of them to be included as filters in PBI. Metrics represent the amount without taxes in: 1) the current month, 2) the previous month, 3) twelve months ago, 4) current year YTD (fiscal year) and 5) previous year YTD (fiscal year).

It also propagates the model to 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.
- [ ] I've picked the right materialization for the affected models. **I was hesitating between table or view. Table should speed up tests, but I intend to create a reporting table with a similar structure so probably a bit of waste of space. Anyway, not a big deal now**

# Other

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

Related work items: #26618
2025-01-31 08:33:15 +00:00
Joaquin Ossa
d793f610c9 Merged PR 4232: Update rule for metric depends on invoicing
# Description

Update rule for when to display metrics that depend on invoicing cycle.
Now they will show previous month values from the 20th onward of the current 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.
- [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.

Update rule for metric depends on invoicing

Related work items: #27180
2025-01-31 08:32:35 +00:00
Joaquin Ossa
1f95d0ee6b Merged PR 4231: Changed MRR logic
# Description

Changed the MRR way of being considered, now it uses for the ongoing month the revenue of the 12 months previous to that one.
Not both MRR metrics will only not show in the current month.
Changed the rule for metrics depending on invoicing so that they show the previous month value from the 20th onward of the current 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.
- [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: #26820
2025-01-31 08:32:21 +00:00
Joaquin Ossa
696ac24e35 updated monthly_aggregated_metrics_history_by_deal 2025-01-30 17:18:08 +01:00
Joaquin Ossa
1e37d04f72 Update rule for metric depends on invoicing 2025-01-30 16:51:35 +01:00
Joaquin Ossa
7ada9de3a1 Added comments 2025-01-30 16:34:27 +01:00
Joaquin Ossa
40c8e20e70 Addressed comments 2025-01-30 16:30:03 +01:00
Joaquin Ossa
bb9dea8ed6 Removed changes for cutoff date 2025-01-30 16:18:29 +01:00
Joaquin Ossa
396d19b549 changed exclusion rule for metrics depending on invoicing 2025-01-30 15:43:53 +01:00
Joaquin Ossa
142b5a526f MRR change 2025-01-30 15:15:34 +01:00
Oriol Roqué Paniagua
a208541e04 Merged PR 4224: Rework accounting aggregations for Financial Reporting
# Description

This PR reworks the Financial Aggregations based on Nathan's requirements, that can be found in an Excel attached to the board ticket.

Main changes:
- Accounting seed now contains 3 financial aggregations as requested by Finance
- These 3 aggregations are propagated up to reporting. This effectively breaks a WIP report - but it's WIP, not in prod, so it's not a big deal

# 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

- [X] Check if a full-refresh is required after this PR is merged. **Need to create the seed manually**

Related work items: #26618
2025-01-30 10:28:49 +00:00
Joaquin Ossa
491cf2743e Merged PR 4223: Cleaned first time booked for deals
# Description

Cleaned first time booked for deals.
Removed fields from models that were previously using it and from schema

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

Cleaned first time booked for deals

Related work items: #27121
2025-01-30 09:23:31 +00:00
Joaquin Ossa
fe317ac17a Cleaned first time booked for deals 2025-01-30 10:16:29 +01:00
Joaquin Ossa
62cecf52f0 Merged PR 4202: New expected MRR metric
# Description

Sorry for this PR, it ended up having a lot of changes. I'll try to list them to make it as clear as possible.
- **int_monthly_onboarding_mrr_per_deal: **This model was changed to obtain all values of `expected_onboarding_mrr_per_deal` for our used dimensions.
- **int_mtd_agg_onboarding_mrr_revenue: **This model obtains the `expected_onboarding_mrr_revenue` for dimension `per_number_of_listings` and `global` which is obtained by adding the values from the first one.
- **int_mtd_aggregated_metrics: ** Removed the `first_time_booked_deals` metric, renamed the `expected_mrr` to `expected_mrr_per_deal` and added `expected_mrr` for the total revenue expected
- **int_mtd_vs_previous_year_metrics: ** removed the `first_time_booked_deals` metric and added the new MRR metrics. Changed how this was being computed, previously it was being done in this same model now it gets them directly from both onboarding_mrr models
- **int_kpis__lifecycle_daily_deal: ** Included all deals in HubSpot and used the `live_date_utc` as the date when deals go live, unless the deal is not in HubSpot then it uses the `created_date_utc` from core
- **int_kpis__metric_daily_deals: ** Changed the logic for `New Deals` so it uses `hubspot_listing_segmentation` instead of `active_accommodations_per_deal_segmentation` like the others states of the deal_lifecycle

**the package-dock.yml need to rebase**

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

New expected MRR metric

Related work items: #26820
2025-01-29 16:07:42 +00:00
Joaquin Ossa
63b1eac81f Addressed comments 2025-01-29 17:06:37 +01:00
Joaquin Ossa
a48f6d0f59 Fixed dumb auto formatting 2025-01-29 17:06:37 +01:00
Joaquin Ossa
c0da375223 Update 2025-01-29 17:06:37 +01:00
Joaquin Ossa
26898322e7 wip fixing deals from hubspot 2025-01-29 17:06:37 +01:00
Joaquin Ossa
cf024f7b71 wip 2025-01-29 17:06:37 +01:00
Joaquin Ossa
cea7cdb34d Removed first_time_booked_deals metric 2025-01-29 17:06:37 +01:00
Joaquin Ossa
88e86ea9ed Added schema 2025-01-29 17:06:37 +01:00
Joaquin Ossa
8bd5851235 created new model to get all mrr metrics 2025-01-29 17:06:37 +01:00
Joaquin Ossa
39de8617b7 New expected MRR metric 2025-01-29 17:06:37 +01:00
Oriol Roqué Paniagua
6dcfe03b30 Merged PR 4215: Fixes
# Description

Small PR to fix 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.

Fixes

Related work items: #27096
2025-01-29 12:46:53 +00:00
Joaquin Ossa
4ed59ffd15 Merged PR 4198: Update Onboarding MRR and Deal Lifecycle
# Description

Changed the name to `Expected Onboarding MRR per New Account` and removed deals lifecycle `Frist Booked`

# 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: #26820
2025-01-27 14:10:44 +00:00