Commit graph

354 commits

Author SHA1 Message Date
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
uri
74a76fe8fc Removes configuration status and adds config id for further joins 2025-03-18 09:20:31 +01:00
uri
91e7fe09b1 Adds end date 2025-03-18 09:09:59 +01:00
uri
cba4b97082 Adds a master table for guest products price plans 2025-03-17 16:35:50 +01:00
Oriol Roqué Paniagua
918ed969d8 Merged PR 4699: Creates a master table for guest products
# Description

Creates a master table for guest products in intermediate. It just gathers information on the name and the latest display name, as well as a couple of additional time fields.

I opted for "latest" rather than "current" because technically Guest Products can be enabled and disabled, and I believe current name would be weird if the product is disabled. Anyway. Next step will be actually creating a master table on guest product configuration, that will handle this disable logic 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: #28513
2025-03-14 13:04:46 +00:00
Oriol Roqué Paniagua
bf1e125856 Merged PR 4687: Bugfix - Removal of SH fields that no longer exist
# Description

After the sync this morning in Core in Airbyte, we have some issues in SH User. This attempts to remove no longer existing fields, namely:
- id_airbnb
- airbnb_url
- platform_comms_recipient

# 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: #28502
2025-03-13 12:25:13 +00:00
Joaquin Ossa
d065d4beb6 New Dash bug fix 2025-03-06 08:16:40 +01:00
Oriol Roqué Paniagua
39fc6a7d13 Merged PR 4618: Bugfix - Ensure the PMS is active
# Description

Very silly mistake - affects many reports!

@<Joaquin Ossa> let me know if there's other use cases. I believe that's all of the computations, but you have this more fresh 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.
- [ ] 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: #28196
2025-03-05 14:57:57 +00:00
Joaquin Ossa
2bc8e6c0c3 Updated test 2025-02-28 09:49:31 +01:00
Joaquin Ossa
1697bef090 timestamps 2025-02-25 15:14:54 +01:00
Joaquin Ossa
4a6158df28 Added timestamp to a/b test model 2025-02-25 14:48:37 +01: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
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
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
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
Joaquin Ossa
275177d674 Silly fix 2025-02-18 12:25:02 +01:00
Oriol Roqué Paniagua
a3793121af Merged PR 4423: Logic for Billable Bookings in New Dash Bookings
# Description

Changes:
* Tags services to be billed (invoiced to host) in the staging models of product_service and protection_plan
* Propagates into booking_service_detail master table. This also computes billable dates.
* Propagates into booking_summary master table. This has the final determination of a booking being billable or not, and when the first and last billing should occur.

# 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: #27619
2025-02-17 15:01:44 +00:00
Joaquin Ossa
aadd0c244b Fixed variable call and naming 2025-02-14 12:19:15 +01:00
Joaquin Ossa
4b94d5f70b Merged PR 3896: S&P invoice model
# Description

New Invoice model for S&P
Quite a dense model, it needs to consider some different situations for the different Protection types, verification status and if the user has the `is_protected` flag active for it's bookings.
I leave the documentation for support to better clarify all the possible scenarios and a screenshot of how it is currently looking the model's result.
There are a couple of rename changes on other models, nothing big.
If there are any inquiries let me know.
https://www.notion.so/knowyourguest-superhog/Invoice-Screen-Protect-1610446ff9c980f88de6d6293b4fab03?pvs=4

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

# 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: #25360
2025-02-14 08:18:42 +00:00
Joaquin Ossa
ca9188b1ab Addressed comments 2025-02-14 08:35:51 +01:00
Joaquin Ossa
a00a4b4e4b Updated model 2025-02-13 17:13:05 +01:00
Joaquin Ossa
9a4c7a312d Invoice model completed 2025-02-13 15:31:22 +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
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
aa840aedd0 fixed naming 2025-02-12 09:24:53 +01: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
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