Commit graph

329 commits

Author SHA1 Message Date
Oriol Roqué Paniagua
e6819f05cc Merged PR 5281: First version of stg_core__user_product_bundle_to_guest_product
# Description

First version in staging of stg_core__user_product_bundle_to_guest_product.

This table informs which Guest Products are enabled for a given New Dash bundle (or program).

Be aware that for these to be effective, the bundle needs to be applied and active to an active listing that generates 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.

Related work items: #30165
2025-05-22 08:15:26 +00:00
Oriol Roqué Paniagua
8c7c3e84cf Merged PR 5246: Ordered services in HS and added new boolean
# Description

Improvements on onboarding data:
* Hubspot services that clients expressed their interest in are now sorted alphabetically. This is needed for:
* A new boolean to compare current active services applied in listings vs. services that captured the interest of the client on onboarding. This can help identify clients that we might need to follow up to ensure all programs are created and applied.

# 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: #30249
2025-05-19 08:40:14 +00:00
Oriol Roqué Paniagua
43a20a3c22 Merged PR 5238: Brings additional sales info from hubspot
# Description

Brings additional info from Hubspot Deals regarding onboarding process

# 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: #30249
2025-05-16 11:08:17 +00:00
Oriol Roqué Paniagua
ca3fc4add9 Merged PR 5234: Remove 2 fields that no longer exist
# Description

Removes 2 fields that no longer exist in the backend. Needed to do since I need to bring another table to sync_core.

No PBI dependencies found.

Fields are:
* flag_as_problem in SH User
* autonavigate in VerificationSet

# 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

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

Related work items: #30229
2025-05-16 10:06:08 +00:00
Oriol Roqué Paniagua
53874ab08a Merged PR 5227: Fix Billable Services New Dash
# Description

Fixes Billable Services categorisation. We were not handling Guest Agreement exclusion. I just changed so instead of including services as billable by default, it's the other way around.

# 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.
2025-05-15 15:01:21 +00:00
Oriol Roqué Paniagua
0bf8cac41a Merged PR 4918: Adds Integration Type from Hubspot Deals
# Description

Extracts Integration Type (OSL, PMS, AutoHost, other API stuff) from Hubspot Deals.

This is needed for the categorisation of Deals in the scope of Old Dash to New Dash migration.

# 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: #28987
2025-04-04 08:40:38 +00:00
Oriol Roqué Paniagua
57626f266a Merged PR 4864: Removes incrementality in booking view to service
# Description

Removes incrementality in booking view to service

# 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

- [X] Check if a full-refresh is required after this PR is merged.
2025-04-01 06:51:40 +00: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
Joaquin
d06f58b76e Removed test users from staging 2025-03-20 09:30:33 +01:00
uri
09976bef13 Removes accepted values test for guest product display name 2025-03-18 16:34:00 +01:00
uri
cba4b97082 Adds a master table for guest products price plans 2025-03-17 16:35:50 +01: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
Oriol Roqué Paniagua
eb26252784 Merged PR 4686: Guest Products - Sync Guest Products
# Description

Adds the remaining Guest Products tables to staging

# 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: #28490
2025-03-13 11:53:04 +00:00
Oriol Roqué Paniagua
7ef460a59e Merged PR 4685: Guest Products - sync core tables
# Description

Adds `VerificationRequestGuestProductToPayment` and `VerificationRequestToGuestProduct` to staging.

Note these tables are empty thus it's possible that some tests might need to be adapted in the future.

I also already added the configuration for sync_guest_product sources.

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

Guest Products - sync core tables

Related work items: #28490
2025-03-13 09:27:02 +00:00
Joaquin Ossa
b20cb44779 Calculator changes 2025-02-28 12:19:24 +01:00
Joaquin Ossa
c85ce8d0a7 new dash guest agreement fix 2025-02-28 09:13:29 +01:00
Joaquin Ossa
42701b4d2c Merged PR 4530: first comment time added
# Description

First comment time added

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

first comment time added

Related work items: #27812
2025-02-27 12:28:09 +00:00
Joaquin Ossa
aaa0b1a5dd changed name 2025-02-26 16:45:01 +01:00
Joaquin Ossa
0fd8c21e38 Small changes 2025-02-26 16:22:32 +01:00
Joaquin Ossa
465bd51ff2 Final update 2025-02-26 08:24:50 +01:00
Joaquin Ossa
271f017cf5 Merged PR 4482: Staging model of resolutions incidents
# Description

New staging model for Resolutions Incidents
It extracts all of the data from the incidents after the ingestion from CosmosDB.
This includes data on the host, the guest, the booking, the listing and all the resolution process until completed if completed.
Though it currently has a lot of problems like missing values, ids not existing in the back end or payments without currencies. Everything is more clarified here https://www.notion.so/truvi/Data-Quality-Report-Resolutions-Incidents-data-1a40446ff9c9807180eaccfeebb53045?pvs=4.

# 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: #27811
2025-02-25 14:15:27 +00:00
Joaquin Ossa
03955aadd5 Finished schema 2025-02-25 14:54:59 +01:00
Joaquin Ossa
f036e626d7 Commit removed unnecessary fields 2025-02-25 12:19:45 +01:00
Joaquin Ossa
62316778fb updated schema 2025-02-24 16:35:10 +01:00
Joaquin Ossa
1d514cec3a Addressed comments 2025-02-24 16:27:16 +01:00
Joaquin Ossa
d7d3422eb9 Update athena models to remove id_accommodation 2025-02-24 15:21:44 +01:00
Joaquin Ossa
34f8fbe499 commit wip 2025-02-24 15:06:55 +01:00
Joaquin Ossa
62c2e44b86 Deduplicated records 2025-02-24 10:57:46 +01:00
Joaquin Ossa
2e19678182 Final tests update 2025-02-23 16:39:43 +01:00
Joaquin Ossa
fb4775bd07 Updated tests 2025-02-23 16:11:37 +01:00
Joaquin Ossa
fc85dd9e70 Fixed data_types and added tests 2025-02-23 16:05:11 +01:00
Joaquin Ossa
d6dcbcc67e commit wip 2025-02-23 15:04:59 +01:00
Joaquin Ossa
f3842c950b commit wip 2025-02-22 19:55:30 +01:00
Joaquin Ossa
9704426dd6 commit wip 2025-02-22 14:16:41 +01:00
Joaquin Ossa
05adc07674 commit wip 2025-02-21 17:44:00 +01:00
Joaquin Ossa
1b853a9503 commit wip (id_incident duplicates have to check) 2025-02-21 16:40:53 +01:00
Joaquin Ossa
725f2a54c3 Staging model for resolution incidents 2025-02-21 15:25:24 +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
Pablo Martin
c3c628aec4 change "tests:" to "data_tests:" 2025-01-13 16:00:35 +01:00
Oriol Roqué Paniagua
33d4f18165 Merged PR 4034: BUGFIX: Ensure id_role are lower case
# Description

Ensures `id_role` are lower case. This should avoid issues downstream in dbt tests.

# 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: #26110
2025-01-13 11:27:29 +00:00
Oriol Roqué Paniagua
d26e08bffd Merged PR 3909: Fixes created_date_utc and updated_date_utc in SH User and its dependencies
# Description

The model `stg_core__superhog_user` contained the fields `created_date_utc` and `updated_date_utc`, which were actually timestamps, not dates. This created issues a while ago in KPIs that were fixed by forcing a date conversion at `int_kpis` level, but the source issue remained unfixed.

This PR just creates the proper fields in staging, meaning:
* `created_at_utc` and `created_date_utc`
* `updated_at_utc` and `updated_date_utc`

And propagates the changes through all dependencies. On KPIs, it also removes the hardcoded date conversion since it's no longer needed. It also adds the different schema entries on which these fields were already defined. Note I didn't update the staging entry since there's no entry for the rest of the fields.

I recommend checking this PR in the commits order.

What I've tested:
* Unified User and User Host have plenty of dependencies that I've checked one by one, at each dependency layer by using dbt docs.
* Run `core__unified_user` and the full execution of +`mtd_aggregated_metrics`

What clearly will fail:
* There's the famous `Users_dashboard` PBI report that shouldn't exist that has a dependency with `core__unified_user`. This report will fail. But it does not exist. I'd like to drop it once and forever

# Checklist

- [X] The edited models and dependants run properly with production data. **See above**
- [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. **The staging model is incremental!**

Related work items: #23703
2024-12-31 08:04:03 +00:00
Joaquin Ossa
19d883ccd7 Simplify PR 2024-12-20 14:04:42 +01:00
Oriol Roqué Paniagua
7b28bbb925 Merged PR 3875: Propagates AccountType to staging
# Description

Propagates `AccountType` to staging by creating the first version of the model `stg_core__account_type`

# 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: #18944
2024-12-19 14:23:47 +00:00
Joaquin Ossa
6fd9c16e59 Merged PR 3872: Staging model for all screen & protect price tables
# Description

Staging model for all screen & protect price tables.
There are 4 types of protections for screen & protect and each of them have their own prices

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

# Other

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

Staging model for all screen & protect price tables

Related work items: #25360
2024-12-19 10:24:10 +00:00
Joaquin Ossa
2a87e4860c Added _in_local_currency to fees namings 2024-12-19 11:13:53 +01:00
Joaquin Ossa
5a92337b43 Clarification of long stay 2024-12-18 14:52:46 +01:00
Joaquin Ossa
463226a44b Staging model for all screen & protect price tables 2024-12-18 14:48:36 +01:00
Joaquin Ossa
c95f551acf s&p update models 2024-12-17 19:09:54 +01:00
Joaquin Ossa
34a5b0d86e Adding missing field in S&P models 2024-12-11 16:35:40 +01:00
Oriol Roqué Paniagua
c0e6ec2de8 Merged PR 3825: Removing Booking fields soon to be dropped
# Description

Following a communication from Gus, the following fields in Booking table are going to be removed:
* StagingHostBookingId
* AdditionalGuests

This PR aims to remove DWH dependencies.

# Checklist

- [X] The edited models and dependants run properly with production data.
- [NA] The edited models are sufficiently documented.
- [X] The edited models contain PK tests, and I've ran and passed them.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] I've picked the right materialization for the affected models.

# Other

- [X] Check if a full-refresh is required after this PR is merged. **Yes, Booking table in staging is incremental**

Related work items: #25405
2024-12-11 13:06:28 +00:00