Commit graph

1599 commits

Author SHA1 Message Date
Joaquin Ossa
a00a4b4e4b Updated model 2025-02-13 17:13:05 +01:00
Joaquin Ossa
67bf836621 commit wip 2025-02-13 15:31:22 +01:00
Joaquin Ossa
c01d09d9f6 Addressed comments 2025-02-13 15:31:22 +01:00
Joaquin Ossa
60ebb13f1d Completed schema 2025-02-13 15:31:22 +01:00
Joaquin Ossa
9a4c7a312d Invoice model completed 2025-02-13 15:31:22 +01:00
Joaquin Ossa
1fff7b91a2 commit wip 2025-02-13 15:29:19 +01:00
Joaquin Ossa
68c21458c2 fixed call 2025-02-13 14:53:44 +01:00
Joaquin Ossa
03bbf54e14 Changed to service_detail_updated_at_utc 2025-02-13 14:52:38 +01:00
Joaquin Ossa
43742355f0 Adding booking services status 2025-02-13 14:45:26 +01:00
Oriol Roqué Paniagua
5382a9b32b Merged PR 4374: Ensures KYG lite users are excluded from New and Old Dash
# Description

Changes:
* **Main change:** exclusion of KYG lite users of the segmentation of Business Scope. These are "freemium" users, kind of demo users, that shouldn't have any real impact in terms of revenue. These are in New Dash, but do not have a deal. The problem is that we don't want to consider them as New Dash, but the current condition was making them appear as Old Dash. This PR fixes this by handling the logic for backend related models. Note that Xero remains unaffected - this is based on Deal, and these users do not have Deal.
* Small data quality fix I noticed while debugging KYG lite cases. It's better to use the "is upgraded service" from the staging original tables rather than the one with the prices. If a user does not have a currency (which can be the case for KYG lite users), then the coalesce would tag any service as not upgraded, which is not true.

# 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-13 09:38:43 +00:00
Joaquin Ossa
db86f75f75 Merged PR 4373: Fixed model error
# Description

Fixed model error

# 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 model error
2025-02-12 15:46:55 +00:00
Joaquin Ossa
b4d19ddbb5 Merged PR 4371: fixed exposures
# Description

Fixed model name

# 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 exposures
2025-02-12 14:49:46 +00:00
Joaquin Ossa
b8c953c7eb Merged PR 4370: new active_users data
# Description

Added active and inactive users:
- Active_users: those that are actually using the services in any accommodation of their bundles
- Inactive_users: basically the difference between users with the service and active_users

# 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 active_users data

Related work items: #25934
2025-02-12 14:35:56 +00:00
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
b63142ea3d Merged PR 4368: Updated exposures
# Description

Updated exposures

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

Updated exposures
2025-02-12 14:00:58 +00:00
Joaquin Ossa
9af7b27e04 new active_users data 2025-02-12 15:00:31 +01:00
Joaquin Ossa
06736de6a6 Updated exposures 2025-02-12 12:50:54 +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