Commit graph

1384 commits

Author SHA1 Message Date
Joaquin Ossa
c7a8420de3 fixed schema 2025-02-12 15:35:03 +01:00
Joaquin Ossa
375c8679cd changed naming 2025-02-12 15:16:41 +01:00
Joaquin Ossa
9e744f41b0 Format schema 2025-02-12 15:03:17 +01:00
Joaquin Ossa
9af7b27e04 new active_users data 2025-02-12 15:00:31 +01:00
Joaquin Ossa
9fa9f0c714 Merged PR 4361: Fixed bookings state variables
# Description

Fixed bookings state variables that had spaces

# Checklist

- [x] 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.

Fixed bookings state variables

Related work items: #25934
2025-02-12 09:09:21 +00:00
Joaquin Ossa
c70c85e923 Fixed bookings state variables 2025-02-12 10:06:36 +01:00
Joaquin Ossa
0aca860f29 Merged PR 4360: Added all booking states
# Description

Included all booking states in the model.
At first I thought I would only show the most relevant but better to show all of them so the total adds up

# 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: #25934
2025-02-12 08:26:25 +00:00
Joaquin Ossa
aa840aedd0 fixed naming 2025-02-12 09:24:53 +01:00
Oriol Roqué Paniagua
edddb0ac37 Merged PR 4357: Propagates in Host Resolutions and Invoiced Revenue the new business scope
# Description

Changes:
* Business scope is now propagated in Host Resolutions and Invoiced Revenue Monthly/MTD Metric and 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: #27356
2025-02-12 08:17:44 +00:00
Joaquin Ossa
0866b2bf9d added all booking states 2025-02-12 09:09:16 +01:00
Joaquin Ossa
83e8723d7d commit wip 2025-02-12 09:07:47 +01:00
Oriol Roqué Paniagua
78707ef649 Merged PR 4352: Bulk update dash_source to business_scope
# Description

Changes:
* Switches dash_source to business_scope in all kpis models, schema and macro configuration.

# 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-11 16:19:33 +00:00
Joaquin Ossa
4f2a34427f Merged PR 4354: ***ing decimals
# Description

It was the amount of decimals the values had because of the exchange rates apparently causing error in PBI

# Checklist

- [x] 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.

***ing decimals

Related work items: #27178
2025-02-11 16:15:05 +00:00
Joaquin Ossa
1577db322f ***ing decimals 2025-02-11 17:10:07 +01:00
Oriol Roqué Paniagua
4867e8f6d0 Merged PR 4349: Xero metrics by Business Scope
# Description

Changes:
* Creation of a deal-based model that contains when a "deal has appeared in new dash". This is tricky because a Deal can still have multiple users, thus it needs to be attributed to a date. I've chosen the first user appearance for the rest of the metrics.
* Adaptation of dimension deals in KPIs to include a client type, that indicates if the deal is from APIs or not (Platform, i.e., Dashboard).
* Xero metrics by Business Scope. This is the previous "dash source" that I need to change in the previously worked models. I decided to include APIs in the segmentation since in most cases we distinguish old dash from new dash by just "anything that is not in new dash". This is very wrong for invoicing metrics, in which we have APIs. So this actually properly computes a client segmentation by scope.

Note that I'll need to handle the monthly/mtd metrics/agg for these 2 metric models (Resolutions + Invoiced revenue) separately.

# 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-11 15:13:42 +00:00
Joaquin Ossa
a2c2907817 Merged PR 4347: fixed rate exchange
# Description

Fixed exchange rate for superhog fee

# Checklist

- [x] 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.

fixed rate exchange

Related work items: #27178
2025-02-11 14:08:30 +00:00
Joaquin Ossa
cb907764ac removed currency 2025-02-11 15:05:35 +01:00
Joaquin Ossa
7f98a5865b fixed rate exchange 2025-02-11 15:04:27 +01:00
Joaquin Ossa
185cbd3274 Merged PR 4340: fix booking_detail model
# Description

Fix `booking_detail` model

# Checklist

- [x] 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 booking_detail model
2025-02-11 12:06:42 +00:00
Joaquin Ossa
b639264710 fix booking_detail model 2025-02-11 12:36:47 +01:00
Joaquin Ossa
c4a6a78bd5 Merged PR 4263: Payments model for legacy report
# Description

Payments model for legacy report
It includes payments with and without taxes for guest payment validations.
It also has the payaway amount depending on whether the host or superhog is taking the risk.

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

In case you want to take a look at how is it looking

![image.png](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/4263/attachments/image.png)

Payments model for legacy report

Related work items: #27178
2025-02-11 11:14:23 +00:00
Joaquin Ossa
125325fcf2 Updated model 2025-02-11 10:44:19 +01:00
Oriol Roqué Paniagua
dffb1d5a1e Merged PR 4336: MTD and Monthly Verification Requests dependant KPIs for Dash Source
# Description

Changes:
* Adds Dash Source in Monthly and MTD Metric models for Verification Request dependant KPIs
* Propagates to Aggregated Monthly and MTD models for VR dependant KPIs
* Eliminates unused Weekly Guest Payment 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: #27356
2025-02-11 08:47:48 +00:00
Oriol Roqué Paniagua
b471b64d9c Merged PR 4335: Rework new dash attribution using booking summary
# Description

Changes:
* On Created and Check Out Bookings daily models, the determination of New Dash bookings now uses `int_core__booking_summary`. This does not change the output, but will be more consistent for other KPIs.
* Adds the categorisation of `dash_source` in all daily metric models that depend on Verification Requests (Guest Journeys). This affects GJ Created, GJ Started, GJ Completed, GJ w. Payment and Guest Payments. Note that the next aggregations (monthly, mtd, agg_monthly, agg_mtd) are not created yet. This will be done in a separated PR.

# 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-11 07:12:46 +00:00
Joaquin Ossa
bc17ee7b4b New waiver fees model 2025-02-10 18:42:15 +01:00
Joaquin Ossa
f846656989 commit wip 2025-02-10 17:48:52 +01:00
Joaquin Ossa
0a0ef84c4c commit wip 2025-02-10 17:48:52 +01:00
Joaquin Ossa
2f1bf584c4 Changed logic to verification_payments 2025-02-10 17:48:52 +01:00
Joaquin Ossa
369608af05 commit wip 2025-02-10 17:48:52 +01:00
Joaquin Ossa
308a70ece4 commit wip 2025-02-10 17:48:52 +01:00
Joaquin Ossa
20f700433d commit wip 2025-02-10 17:48:52 +01:00
Joaquin Ossa
0d11302a20 commit wip 2025-02-10 17:48:52 +01:00
Joaquin Ossa
b6bc19269d Fixed waiver payment logic 2025-02-10 17:48:52 +01:00
Joaquin Ossa
be6ccbafa7 Payments model for legacy report 2025-02-10 17:48:52 +01:00
Joaquin Ossa
aa04b1a84f Merged PR 4317: Services Usage in New Dash
# Description

Model that shows the usage of each New Dash service by users, listings and booking (and segmented by state)

# 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: #25934
2025-02-10 14:01:35 +00:00
Joaquin Ossa
ed696488bf Updated 2025-02-10 14:57:46 +01:00
Oriol Roqué Paniagua
45d8224416 Merged PR 4326: Remove cancelled Bookings. Adds index in mtd_aggregated_metrics
# Description

Main changes:
* Remove Cancelled Bookings previous logic.
* Speeds up Main KPIs by adding a couple of indexes in `mtd_aggregated_metrics`. Tested in prod, to me it looks like it's quite fast now.

# 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-10 13:14:31 +00:00
Joaquin Ossa
e39e17fd21 finished schema 2025-02-10 08:18:11 +01:00
Joaquin Ossa
191f837a69 small fix display_name 2025-02-10 08:14:02 +01:00
Joaquin Ossa
560531aa1e Addressed comments 2025-02-10 08:09:22 +01:00
Joaquin Ossa
25aa153eed Added end_of_time variable 2025-02-07 15:20:22 +01:00
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