Commit graph

1228 commits

Author SHA1 Message Date
Oriol Roqué Paniagua
b20b819456 Merged PR 3878: Propagates account type to intermediate
# Description

Propagates account type to intermediate. Also, adds minimal documentation to `int_core__unified_user`.

There's only 54 test accounts in Unified User and 49 that are considered as User Hosts. So it's not, by all means, an extensive list of test accounts...

There's a mismatch between the `created_date_utc` and `updated_date_utc` that these are timestamps. There's another ticket in the backlog to handle this alongside the dependency, so it's not included here.

# 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 16:33:35 +00: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
Pablo Martín
14fd52bb36 Merged PR 3871: Add FX rates integration exposure.
# Description

Adds the fx rates integration as an exposure since it's a downstream dependency just like a dashboard would be.

# Checklist

NA

# Other

NA

Related work items: #25608
2024-12-19 11:32:16 +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
5475bdd513 Merged PR 3869: S&P models update
# Description

This PR is mainly to update the `int_screen_and_protect__verification_requests` model to include some data from Wilbur needed for the invoice.
This includes fields like `price_discounts` or `price_increases` all of which have a start and end date which should be the first and last date of any month correspondingly for when the discount/increase is being applied. For this I added some custom tests to make sure that the dates are correct, as well as another test to check that the `general_discount` and the `volume_discount` are not active at the same time, is one or the other (let me know if you think it is a bit overkill).

On the other hand I modified the `created_date` and `creation_date` fields on all the verification_request models for S&P which where incorrectly classified as cosmos_creation_date or reservation_created_date and it was the other way around. (I am aware that this will affect the PBI report, currently there is no real data so it is not an issue)

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

s&p update models

Related work items: #25360
2024-12-19 10:02:35 +00: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
Pablo Martin
4dbecae0ba add exposure 2024-12-18 14:39:23 +01:00
Joaquin Ossa
0cebdcf160 new approach for S&P users data extraction 2024-12-18 11:46:54 +01:00
Joaquin Ossa
24aa9b7021 Helped with readability on test 2024-12-18 10:52:52 +01:00
Joaquin Ossa
c95f551acf s&p update models 2024-12-17 19:09:54 +01:00
Oriol Roqué Paniagua
384665c487 Merged PR 3857: Propagate Amount of Properties in HS deal
# Description

Adds the field amount_of_properties to hubspot deals, in intermediate

# 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.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] 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: #25351
2024-12-17 09:02:11 +00:00
Joaquin Ossa
defa36de8a Merged PR 3855: fixed number of nights in edeposit
# Description

There was an error in the number of nights for e-deposit verifications because the order of the columns when using union all of both athena and e-deposit tables that `number_of_night`s was switched with `total_fee_local` for e-deposit, this was generating weird values that was catched on by Ana.

# 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 number of nights in edeposit

Related work items: #25546
2024-12-16 13:58:49 +00:00
Joaquin Ossa
3653ad8adf fixed number of nights in edeposit 2024-12-16 13:53:57 +01:00
Joaquin Ossa
2426d5c6fd Merged PR 3843: Added the has_user_moved_from_old_dash field
# Description

Added the has_user_moved_from_old_dash field for the PBI 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 the has_user_moved_from_old_dash field

Related work items: #25191
2024-12-13 10:00:08 +00:00
Joaquin Ossa
4569c5d0da Added the has_user_moved_from_old_dash field 2024-12-13 10:56:56 +01:00
Joaquin Ossa
bcff898e45 Merged PR 3842: update exposures
# Description

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

update exposures

Related work items: #25427
2024-12-12 16:37:47 +00:00
Joaquin Ossa
f2394d89ac new link 2024-12-12 17:06:31 +01:00
Joaquin Ossa
52ecdc1046 update exposures 2024-12-12 16:46:45 +01:00
Joaquin Ossa
f2e5df0fa5 Merged PR 3834: Added nbr of nights to avoid calculation in PBI
# Description

Added nbr of nights to avoid calculation in PBI

# 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 nbr og nights to avoid calculation in PBI

Related work items: #25403
2024-12-12 11:13:08 +00:00
Joaquin Ossa
dbbfe2eb44 Changed description 2024-12-12 11:29:11 +01:00
Joaquin Ossa
e18750d720 Added nbr og nights to avoid calculation in PBI 2024-12-12 11:27:48 +01:00
Joaquin Ossa
85a02f8a1e Merged PR 3826: Check in Hero models
# Description

Check in Hero models for new report, it contains all records of check in hero API with user partner info

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

Check in Hero models

Related work items: #25403
2024-12-11 16:23:12 +00:00
Joaquin Ossa
8052581a3d Merged PR 3827: S&P models update
# Description

Added the missing field `is_protected` to the S&P models that comes from the `apim_users` table
I also modified the `apim_users` so the json field is actually stored as a json

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

Related work items: #25243
2024-12-11 15:59:11 +00:00
Joaquin Ossa
34a5b0d86e Adding missing field in S&P models 2024-12-11 16:35:40 +01:00
Joaquin Ossa
11eecfec99 addressed comments 2024-12-11 16:13:34 +01:00
Joaquin Ossa
a564afea3c wip 2024-12-11 15:42:35 +01:00
Joaquin Ossa
cbb93982d0 Check in Hero models 2024-12-11 14:32:39 +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
Joaquin Ossa
af7a194840 Merged PR 3823: Apim User staging models
# Description

Apim User staging models
It includes both the model for users data (most of it contained in a json document) as well as user type for each API platform

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

Apim User staging models

Related work items: #25404
2024-12-11 11:23:31 +00:00
Joaquin Ossa
ae80c6eb7f fixed id_apim_user description 2024-12-11 12:18:33 +01:00
Joaquin Ossa
0c9c284e3c Apim User staging models 2024-12-11 12:05:01 +01:00
Joaquin Ossa
ca0fa8b62d Merged PR 3821: fixed name
# Description

Fixed column name

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

Related work items: #25344
2024-12-11 09:50:22 +00:00
Joaquin Ossa
baa437708f fixed name 2024-12-11 10:47:33 +01:00
Joaquin Ossa
15fd885f8a Merged PR 3814: staging model check in hero
# Description

Staging model for Check-ins from CIH API

# 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 check in hero

Related work items: #25344
2024-12-10 17:19:45 +00:00
Joaquin Ossa
b17e865162 local currency 2024-12-10 17:12:14 +01:00
Joaquin Ossa
92dd5b0960 Updated currency description 2024-12-10 15:53:22 +01:00
Joaquin Ossa
902e474148 staging model check in hero 2024-12-10 12:03:34 +01:00
uri
c3d75bb143 Differentiate exposures 2024-12-09 17:22:16 +01:00
Oriol Roqué Paniagua
06603d01e2 Merged PR 3810: Adds is_end_of_month_or_yesterday for Main KPIs
# Description

Adds `is_end_of_month_or_yesterday` for Main KPIs.
Apparently, the fact that we do not show the ongoing value of the month on some tabs of Main KPIs is the main blocker for Ben C to consistently use Main KPIs, which he actually retrieves from the SH legacy reporting. Since I'm sceptical about the data shown there, I want to remove this blocker.
It will require a small PR on PBI as well.

# 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.
- [NA] 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: #25342
2024-12-09 16:13:52 +00:00
Joaquin Ossa
8586dc2aec Merged PR 3802: exposures update
# Description

Exposures update of new Screen & Protect report

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

exposures update

Related work items: #25244
2024-12-09 13:54:33 +00:00
Joaquin Ossa
dfd7e50edd Changed it to API Reports and added E-Deposit Verifications 2024-12-09 11:12:37 +01:00
Joaquin Ossa
be6e87efb1 exposures update 2024-12-09 09:20:15 +01:00
uri
0c82a9592d Remove accepted values test from service status in stg_core__booking_view_to_service 2024-12-04 16:49:07 +01:00
Joaquin Ossa
32f1dd68a1 Merged PR 3775: Final clarifications
# Description

A few changes on some fields I got clarified, some of the protection amount fields are used for some types of protections.
Also verified the difference between created date and creation date (Cosmos value)

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

Final clarifications

Related work items: #25243
2024-12-04 15:42:14 +00:00
Joaquin Ossa
1f683ec651 Final clarifications 2024-12-04 16:33:50 +01:00
Joaquin Ossa
0b6612f25b Merged PR 3771: Intermediate and reporting models
# Description

Intermediate and reporting models for Screen and Protect verifications.
Added a field I missed before, ProtectionType

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

intermediate and reporting models

Related work items: #25243
2024-12-04 13:51:03 +00:00
Joaquin Ossa
2a19f1d19a Added ProtectionType 2024-12-04 14:36:49 +01:00
Joaquin Ossa
c8ee8bd456 intermediate and reporting models 2024-12-04 11:15:21 +01:00