Commit graph

53 commits

Author SHA1 Message Date
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
4569c5d0da Added the has_user_moved_from_old_dash field 2024-12-13 10:56:56 +01: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
Joaquin Ossa
6f77309b8c addressed comments 2024-11-12 17:10:42 +01:00
Joaquin Ossa
463f5edfc3 new dash new data 2024-11-12 16:33:55 +01:00
Oriol Roqué Paniagua
5735251c67 Merged PR 3239: Decommission Verification Payments V1
# Description

Decoms verification payments v1 version, and keeps v2 alive. The PBI of Guest Payments (Biz Overview) was already switched to V2 but the exposures was not reflecting it, so I changed this. Then I dropped all v1 models for verification payments and their entries in schema.

# Checklist

- [X] The edited models and dependants run properly with production data. I did run the upstream dependencies on V2 and I don't see orphans in my dbt docs. However I did not fully run end-to-end all models up to PBI reports since there's other sources involved (Xero, etc).
- [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: #22611
2024-10-18 09:59:29 +00:00
Oriol Roqué Paniagua
feaedb2a06 Merged PR 2911: Bugfix core__bookings failing dbt test
# Description

Fixes issue

# 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.
2024-09-19 07:00:15 +00:00
Joaquin Ossa
01eca0dbcc Merged PR 2877: Update model core__verification_payments to include amounts without taxes
# Description

Update model core__verification_payments to include guest payment amounts without taxes

# 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.
2024-09-18 14:30:23 +00:00
Joaquin Ossa
923bfa7091 Update exposures to pull from version 1 2024-09-18 14:20:48 +02:00
Oriol Roqué Paniagua
985ddb8e4d Merged PR 2887: Check-In Hero - Removing unused fields + schema changes
# Description
This PR closes the ticket #20046

Changes:
* Removes temporary fields marked as legacy in `core__vr_check_in_cover`, after the changes in the 3 PBI Check-In Hero reports.
* Additionally, I modified the schema entry to comply with the current fields available in this model.

# Checklist

- [X] The edited models and dependants run properly with production data. *Checked in local changing the sources to localhost after dropping the fields.*
- [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. *N/A*
- [ ] I've picked the right materialization for the affected models. *N/A*

# Other

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

Remove temporary fields

Related work items: #20046
2024-09-18 11:48:49 +00:00
Joaquin Ossa
40bfa60016 core__verification_payments_v2 2024-09-18 12:41:00 +02:00
Joaquin Ossa
78e7e37c5e Update model core__verification_payments to include amounts without taxes 2024-09-17 17:22:37 +02:00
Oriol Roqué Paniagua
7b9ba021c1 Merged PR 2865: Propagate tax exclusive check in hero payments
# Description

This PR propagates tax exclusive check in hero payments for the reporting of Check in Hero.
Additionally, it keeps propagating the amounts with tax inclusiveness in case, at some point, we need them. These are with the new naming convention.

In order not to break anything, the previous amounts are duplicated and aliased in reporting.

Lastly, I spent some time adding some clarifications and documenting payments set to currency and the dependant used for check in hero.

# 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: #20046
2024-09-17 07:25:09 +00:00
Pablo Martin
df16cdb00c reporting schema 2024-09-12 15:39:49 +02:00
Oriol Roqué Paniagua
2facaceec0 Merged PR 2662: New Dash MVP - with. fix on production issue
# Description

Same PR as before, just adds a new commit that fixes my silly issue in prod. I owe some drinks :D

# 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: #19570
2024-08-28 10:09:08 +00:00
Oriol Roqué Paniagua
a0b5b0bda1 Merged PR 2660: Revert 'Automating new dash query'
# Description

_Describe your motivation and changes here._

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

# Description

Automates the new dash query through DWH. It's a first step towards enabling a very simple PBI reporting on new dash performance. Data is aggregated at user level with the main performance indicators that we're currently reporting. I added a few more informative fields from user side.

Changes:

* in intermediate, creation of `int_core__new_dash_user_overview`. It mainly uses the models in previous PRs to avoid crazy computations, since most of the logic has already been implemented. The only thing is that it's "hardcoded" (with variable) the categorisation of what is NOT a paid service.
* in reporting, creation of `core__new_dash_user_overview`. It just exposes the info from intermediate to reporting.
* added schema entries for intermediate/core and reporting/core, it's the same description for both cases.

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

Reverts !2657

Related work items: #19570
2024-08-28 09:40:09 +00:00
Oriol Roqué Paniagua
8f38e94a5c Merged PR 2657: Automating new dash query
# Description

Automates the new dash query through DWH. It's a first step towards enabling a very simple PBI reporting on new dash performance. Data is aggregated at user level with the main performance indicators that we're currently reporting. I added a few more informative fields from user side.

Changes:

* in intermediate, creation of `int_core__new_dash_user_overview`. It mainly uses the models in previous PRs to avoid crazy computations, since most of the logic has already been implemented. The only thing is that it's "hardcoded" (with variable) the categorisation of what is NOT a paid service.
* in reporting, creation of `core__new_dash_user_overview`. It just exposes the info from intermediate to reporting.
* added schema entries for intermediate/core and reporting/core, it's the same description for both cases.

# 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: #19570
2024-08-28 09:32:17 +00:00
Joaquin Ossa
bf9652f258 Finished adding address_validation to reporting 2024-08-20 14:11:21 +02:00
Joaquin Ossa
25e657014a Modified filter and table used 2024-08-01 14:32:45 +02:00
Joaquin Ossa
0281e6e72e Included the exchange rate to GBP in the model 2024-08-01 12:58:36 +02:00
Joaquin Ossa
a75a4e9763 Added host_booking_fees model to report 2024-07-31 17:35:14 +02:00
Joaquin Ossa
bfe224577c Creating model in reporting 2024-07-25 11:34:07 +02:00
Joaquin Ossa
93a4664332 Added booking_source to reporting model core__guest_satisfaction_responses 2024-07-15 08:54:11 +02:00
Oriol Roqué Paniagua
0c1535b150 Merged PR 2267: Business KPIs refactor - cleaning
This PR cleans the unused models in reporting that keep the "core" wrong convention. Also drops schema documentation for these.
Lastly, exposures have been updated to point towards the new production models.

- This is the last PR for the refactor! ![dbt-dag (2).png](https://guardhog.visualstudio.com/4148d95f-4b6d-4205-bcff-e9c8e0d2ca65/_apis/git/repositories/54ac356f-aad7-46d2-b62c-e8c5b3bb8ebf/pullRequests/2267/attachments/dbt-dag%20%282%29.png)

Refactor documentation: https://www.notion.so/knowyourguest-superhog/Refactoring-Business-KPIs-5deb6aadddb34884ae90339402ac16e3

Related work items: #18202
2024-07-11 09:17:44 +00:00
Oriol Roqué Paniagua
20e7220ffe Merged PR 2246: KPIs refactor: naming convention and PBI sources replication
Changing naming to follow convention.
This PR has the following changes:
- the model `int_core__mtd_aggregated_metrics` has been moved to cross and changed the name to `int_mtd_aggregated_metrics`
- the model `int_core__monthly_aggregated_metrics_history_by_deal` has been moved to cross and changed the name to `int_monthly_aggregated_metrics_history_by_deal`
- the reporting models `core__mtd_aggregated_metrics` and `core__monthly_aggregated_metrics_history_by_deal` now source the `int_mtd_aggregated_metrics` and `int_monthly_aggregated_metrics_history_by_deal` to avoid breaking the production dashboard
- the reporting models have been duplicated from core into general with the correct names, i.e., `mtd_aggregated_metrics` and `monthly_aggregated_metrics_history_by_deal`
- Documentation has been moved in intermediate and replicated in reporting, adding comments on the currently in use models that are going to die soon.

This will allow for a transition of the PBI dashboard from one source to another. Exposures file still not touched since technically the report is still sourcing the 'legacy' models. Documentation of the refactor here: https://www.notion.so/knowyourguest-superhog/Refactoring-Business-KPIs-5deb6aadddb34884ae90339402ac16e3

Related work items: #18202
2024-07-09 15:14:50 +00:00
Joaquin Ossa
34df8a7ef9 Merged PR 2201: Fixing errors raised by texts
Tiny PR to fix errors raised by texts
2024-07-05 15:12:04 +00:00
Joaquin Ossa
2738c8617d Fixing errors raised by texts 2024-07-04 16:41:41 +02:00
Joaquin Ossa
2efc1d8b65 Merged PR 2178: New model for guests satisfaction report
New model for guests satisfaction report, I included columns to check what is the guest paying for that might be helpful for analysis as well

Related work items: #16947
2024-07-04 10:13:11 +00:00
Joaquin Ossa
205bc6534d Modified date name to stick to convention 2024-07-04 08:24:23 +02:00
Joaquin Ossa
6bc26a66ff Changed date name to check_in_cover_added_date and included model in reporting 2024-07-03 17:43:27 +02:00
Joaquin Ossa
3b22832d8b Created model in reporting as well with schema 2024-07-03 16:34:33 +02:00
Oriol Roqué Paniagua
ed5d7828a7 Merged PR 2179: Computes aggregated metrics by deal id and exposes it to reporting
This PR creates 2 new models:
- `int_core__monthly_aggregated_metrics_history_by_deal`, which just gathers the information of the previously created models that compute the kpis by deal id.
- `core__monthly_aggregated_metrics_history_by_deal`, effectively a copy from intermediate to reporting

It also includes documentation of these 2 models, differences between these and the `mtd_aggregated_metrics` equivalents and references it to exposures. I took the opportunity to update the documentation of the `core__mtd_aggregated_metrics` now that it's a bit more mature.

This should be the last PR for the first draft of 'by deal' metrics.

Related work items: #17689
2024-07-03 07:06:34 +00:00
Joaquin Ossa
256c638b04 Added id_deal to both intermediate and report model 2024-07-01 10:48:00 +02:00
Joaquin Ossa
50f93a2980 Created check_in_cover_users in reporting for check-in hero report 2024-06-27 12:24:45 +02:00
Oriol Roqué Paniagua
4958976733 Merged PR 2053: Added number_format category in mtd_aggregated_metrics
Added number_format category in mtd_aggregated_metrics

Related work items: #17458
2024-06-17 14:59:01 +00:00
Oriol Roqué Paniagua
4f6728003a Merged PR 2029: Guest Journey - start date based on used link
Added verification estimated started at/date utc.
Ensured continuity for existing reports

I also noticed I missed one propagation of the end date, it's fixed here.

Note: changed the naming from 'start' to 'started' since we already had 'completed' and 'used_link'

Related work items: #17268
2024-06-13 14:53:58 +00:00
Oriol Roqué Paniagua
7914d7d8d7 Merged PR 2028: guest journey estimated completed date
This PR includes the logic to handle the completed date of guest journey

Check the schema file to understand the logic implemented. It's an estimation, and in some cases, weird stuff happens on end dates before link usage dates, which effectively breaks the computation. I added a boolean for this

Related work items: #17268
2024-06-13 13:30:22 +00:00
Joaquin Ossa
c4f87d9403 Applied changes according to comments 2024-06-12 15:11:07 +02:00
Joaquin Ossa
33aac0be1a Added core__unified_user to reporting with the documentation 2024-06-12 15:11:07 +02:00
Oriol Roqué Paniagua
328723b9ab Merged PR 2003: Business KPIs first draft
This PR aims to provide a first draft for business KPIs, at this stage **quite minimal**.

It mostly contains a MTD and Monthly display approach. No dimensions are created.

The models created are:
- **int_dates_mtd**: mainly it reads from int_dates to retrieve those days needed for a MTD/monthly display
- **int_core__mtd_booking_metrics**: it contains the booking metrics, ending in a format of date|value|value last year|increment
--> here we could add, in the future, additional metrics from other sources (ex: guest journey, etc)
- **int_core__mtd_aggregated_metrics**: it transforms the data coming from the different mtd intermediate sources to be easily displayed in the dashboard. This is a good candidate for macros :)
- **core__mtd_aggregated_metrics**: copy-paste of the its int_core version, including a bit of model documentation

The dashboard is functional but in another PR. I can show you how it looks like at the moment you are going to check the PR

Related work items: #17214
2024-06-11 15:45:57 +00:00
Pablo Martín
366aa7d1ac Merged PR 2005: Replace Guest Details in CheckIn Cover models with details coming from User table
Fixes https://guardhog.visualstudio.com/Data/_boards/board/t/Data%20Team/Stories/?workitem=17240

Related work items: #17240
2024-06-10 15:30:26 +00:00
Joaquin Ossa
1bb4229dce updated docs for core__verification_requests from Pablo's comments 2024-06-10 11:32:04 +02:00
Joaquin Ossa
5e7504499f Added description document for core__verification_requests 2024-06-06 12:00:07 +02:00
Joaquin Ossa
a5074a1545 Created verification_requests model in report 2024-06-06 10:11:34 +02:00
Pablo Martin
9c338a31ce propagating renames 2024-05-08 12:03:44 +02:00
Pablo Martin
001b59540a add docs for reporting model 2024-05-06 17:50:08 +02:00
Pablo Martin
3b1301ff6e a few more details 2024-05-03 17:24:35 +02:00
Pablo Martin
a83cb7f100 final reporting model 2024-04-29 14:41:46 +02:00
Pablo Martin
67991800ef docs and moving stuff 2024-04-08 09:44:32 +02:00