Commit graph

282 commits

Author SHA1 Message Date
Joaquin Ossa
463226a44b Staging model for all screen & protect price tables 2024-12-18 14:48:36 +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
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
baa437708f fixed name 2024-12-11 10:47:33 +01: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
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
1f683ec651 Final clarifications 2024-12-04 16:33:50 +01:00
Joaquin Ossa
2a19f1d19a Added ProtectionType 2024-12-04 14:36:49 +01:00
Joaquin Ossa
fba05c5dd3 Merged PR 3763: Staging model for S&P
# Description

Staging model for S&P
What do you think of the name of both the folder and model, I would prefer to leave it as `screen&protect` instead of `screen_and_protect` what do you think??

# 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 S&P

Related work items: #25209
2024-12-04 09:59:51 +00:00
Joaquin Ossa
588e94ed7c Upper cased 2024-12-04 10:59:13 +01:00
Oriol Roqué Paniagua
896526fe15 Merged PR 3761: Remove no longer existing fields from Accommodation
# Description

This PR aims to properly fix the Accommodation removal of fields that have been dropped today.

# 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

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

Related work items: #25199
2024-12-03 16:39:05 +00:00
Joaquin Ossa
d5f0db71fd Staging model for S&P 2024-12-03 17:29:37 +01:00
Oriol Roqué Paniagua
e8f7278032 Merged PR 3756: First version of verification request feature flag
# Description

Brings VerificationRequestFeatureFlag to staging. Needs further modelling to clean data for A/B test tracking purposes, but this will be done 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.
- [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: #25145
2024-12-03 16:01:23 +00:00
Oriol Roqué Paniagua
62e1b6ea3b Merged PR 3752: Adds new PROTECTED accepted value for new pricing services
# Description

Adds Protected accepted value - linked to new services after New Dash v3 launch

# Checklist

- [NA] 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

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

Adds new PROTECTED accepted value for new pricing services
2024-12-03 13:36:24 +00:00
Oriol Roqué Paniagua
c5b7d919c5 Merged PR 3743: Hotfix for staging core accommodation
# Description

Fixes dbt execution after 2 fields in use were dropped in the backend.

# 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

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

Related work items: #25196
2024-12-03 11:26:52 +00:00
Pablo Martin
f460a47833 remove fields from stg 2024-11-27 14:46:41 +01:00
Oriol Roqué Paniagua
aa3261cf9d Merged PR 3632: Brings Billing tables into Staging
# Description

Aims to bring the 2 new billing tables in the scope of New Pricing into DWH.
These correspond to a Product Service table and a Protection Plan table.

Further modelling is expected in intermediate. Main goal would be to enrich the tables of `int_core__booking_service_detail` and `int_core__booking_summary`

# 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: #20809
2024-11-22 08:34:58 +00:00
Oriol Roqué Paniagua
f1359bf696 Merged PR 3578: First version of int_core__booking_service_detail
# Description

Minor Changes:
* Computation in staging of `is_default_service` column for Basic Screening. This includes `stg_core__product_service`, `stg_core__protection_plan` and the schema entry.
* Propagation of `is_default_service` to intermediate. This includes `int_core__protection_plan_to_price`, `int_core__product_service_to_price` and the schema entry.
* Adapting a small data test to include a new case in `stg_core__booking_view_to_service` schema entry.

Main Changes:
* New fields and re-order existing ones on `int_core__booking_to_service`.
* Changed materialisation of `int_core__booking_to_service` to a view, since the new model `int_core__booking_service_detail` is materialised as table.

New Model:
* First version of `int_core__booking_service_detail`. This model includes the current state of a Service that is applied within a Booking. It includes many Booking attributes, Service attributes as well as some meta data fields regarding the business scope and type, according to the [New Pricing](https://www.notion.so/knowyourguest-superhog/All-Services-Definitions-333fba1fbed54715b6b1c3b5133f0d4f) documentation.
* This is one of the 3 Booking models that I propose to create for New Pricing. You can read about the others [here](https://www.notion.so/knowyourguest-superhog/Services-and-Revenue-modelling-1420446ff9c980118e0cfffa7c41f369), although I'll probably won't do them until New Dash is finalised on tech side.
* This current model should suffice to be able to understand which services are applied within a Booking. Notably you will see that this is not enough to compute revenue, as there's some placeholders in place. This is expected.

# 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: #20809
2024-11-19 08:24:32 +00:00
Oriol Roqué Paniagua
c209e670ca Merged PR 3539: Normalise service names and create booking to service table
# Description

Goal of the PR is start modelising the Services and Revenue for New Dash/New Pricing. Be aware that this is a first model and it's not by all means the definitive nor complete version.

Changes:
* Services name normalisation: It's a bit painful because we usually had two names: 'MyService' and 'My Service'. The initial setup I built was considering the first, but in some new integrated tables it only has the second. So I just standardised everything to be in upper case and with spaces such as 'MY SERVICE'. Might make more sense later on. This affects many existing models.
* Compute a new Service Business Type field in `stg_core__product_service`: Main reason is that effectively Platform scope in New Pricing have business differences in the services types but this does not exist in the backend. I do it at staging level with a dedicated accepted values test to ensure any new update is captured and notified. You can read more about the business logic in this [Notion page](https://www.notion.so/knowyourguest-superhog/All-Services-Definitions-333fba1fbed54715b6b1c3b5133f0d4f).
* Create a new model `int_core__booking_to_service`: this model joins the information of BookingViewToService with BookingView and Booking tables to retrieve a more consolidated version of what we will needed downstream for the future table of Booking Service Detail and the Aggregated version (not included in this PR). This table likely can be enriched in future PRs. At the moment it just contains the bare minimum fields needed for the lines/aggregated versions. (NB: Booking information is needed, for instance, for the services which unit price need to be applied for the number of nights of the booking)

# 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

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

Related work items: #20809
2024-11-15 10:04:02 +00:00
Oriol Roqué Paniagua
321f48ca7d Merged PR 3506: Remove Address Validation
# Description

Removes Address Validation within DWH.
Note that I keep the 2 reporting fields, nullified. These should be removed after the removal of these fields in PBI.

# 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

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

Related work items: #23976
2024-11-14 11:59:36 +00:00
Oriol Roqué Paniagua
cce5d2b9d6 Merged PR 3490: Removal of other_sharing_platform_url
# Description

Removes other_sharing_platform_url field that will disappear from the backend in the release going out next week.

Apparently there's a dependency with a PBI report that uses core__unified_user table, so I just nullified the reporting field. The report is called users_dashboard, which AFAIK is not published anywhere. I wonder if this is one of the it-should-not-exist report. Waiting for tomorrow confirmation with Pablo.

Important note: Since this removes fields from staging, which is incremental, we need to trigger a full-refresh for this table. Otherwise execution will fail.

# 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, please refer to my previous comment.**

Related work items: #23974
2024-11-13 09:23:42 +00:00
Oriol Roqué Paniagua
c21040fa30 Merged PR 3523: First version of BookingView and BookingViewToService integration
# Description

Modelises 2 new tables into staging:
* BookingView
* BookingViewToService

Ideally, we need the contents of BookingToService. This does not exist, so we will need to modelise it in intermediate. Current relationship is that 1) we know services applied to a booking view id (BookingViewToService ) 2) we know booking view id how it relates to booking (BookingView) 3) we can retrieve booking info as usual (Booking, etc)

# 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: #23996
2024-11-13 09:23:20 +00:00
Oriol Roqué Paniagua
3faf03c139 Merged PR 3207: Cast as dates and timestamps for hubspot deals in staging
# Description

Changes data type of dates and timestamps of relevant fields in stg_hubspot__deals

# 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: #22689
2024-10-16 14:57:36 +00:00
Pablo Martin
bd7a54050f split edeposit source 2024-10-16 14:20:24 +02:00
Pablo Martin
c0e411ee12 remove duplicate deals entry 2024-10-15 18:03:31 +02:00
Pablo Martin
d9a90d7d24 partial schema. Not doing more because deals is a monster 2024-10-15 15:41:20 +02:00
Pablo Martin
e5b18f2ce7 rename col 2024-10-15 14:37:10 +02:00
Pablo Martin
7e9248aa6e added properties 2024-10-15 14:37:10 +02:00
Pablo Martin
ee0d60382d more schemas 2024-10-14 11:55:44 +02:00
Pablo Martin
5c64bf8b20 schema and final touches for deal pipeline 2024-10-14 11:47:44 +02:00
Pablo Martin
b9958129bc stages model 2024-10-14 11:37:42 +02:00
Pablo Martin
c0718daaa9 deal pipeline 2024-10-14 11:10:07 +02:00
Pablo Martin
ba29afa3bd docs for athena staging 2024-10-08 14:41:17 +02:00
Pablo Martin
13819c9f99 update edeposit staging 2024-10-08 14:39:25 +02:00
Pablo Martin
d3de03890c more todos 2024-10-08 14:37:00 +02:00
Pablo Martin
d21d9b6a01 todos 2024-10-08 14:37:00 +02:00
Pablo Martin
654255321f fix typo in version 2024-10-08 14:37:00 +02:00
Pablo Martin
d16647ac72 push upstream the filter 2024-10-08 14:37:00 +02:00
Pablo Martin
67dcc8b237 split staging layer 2024-10-08 14:37:00 +02:00
Oriol Roqué Paniagua
b70f426f8e Merged PR 3089: Remove custom pricing/protection
# Description

This PR aims to remove custom pricing/protection fields for New Pricing.
After discussing with Clay, custom pricing/protected amounts are not allowed in New Pricing. This user-specific changes might be applied in the form of discounts, but these are not defined/implemented yet.

There were some fields created in the New Pricing tables that were considering the custom possibility, and Gus confirm that these will come as Null. So I prefer to delete them now, have clean code, and if in X months dev team wants to remove these, we should be good.

# 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: #20809
2024-10-08 11:48:25 +00:00
Pablo Martin
0c3be659b1 remove test 2024-10-07 14:28:05 +02:00
Joaquin Ossa
b8caa18352 Merged PR 3000: Stg Hubspot form_submissions
# Description

Creation on stg_hubspot__form_submissions model

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

Stg Hubspot form_submissions
2024-10-04 09:49:54 +00:00
Joaquin Ossa
9ad768f6bb Merged PR 2990: staging Hubspot contacts
# Description

Creation on stg_hubspot__contacts model

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

staging Hubspot contacts
2024-10-04 09:48:37 +00:00
Joaquin Ossa
751a95f9ae modified macro 2024-10-04 08:42:28 +02:00
Oriol Roqué Paniagua
28c554de63 Merged PR 3038: Adding Protection tables in the scope of New Pricing/Dashboard
# Description

This PR creates 3 new models in staging:
- `stg_core__protection_plan`: main information of a protection plan. Here I denormalise the info coming from Protection, meaning, Protection is not a standalone model.
- `stg_core__protection_plan_to_price`: How much does a protection service cost? It's very similar to the model product_service_to_price.
- `stg_core__protection_plan_cover`: How much does a protection service protects, i.e., covers? I took the liberty of modifying the original name since it was confusing to me. Let me know if you'd like to modify the 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.
- [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: #20809
2024-10-03 11:05:05 +00:00
Joaquin Ossa
e9f16342e7 added tests 2024-10-03 12:19:27 +02:00