Commit graph

957 commits

Author SHA1 Message Date
Pablo Martin
73753092fa yolo activate vacuum analyze 2024-09-20 18:11:59 +02:00
Joaquin Ossa
e401efdd5d Merged PR 2933: Financial rate metrics
# Description

Changed the financial rate metrics to have `number_fomat = "converted_metric_currency_gbp"`

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

Financial rate metrics

Related work items: #21564
2024-09-20 14:29:30 +00:00
Joaquin Ossa
838628c7a8 deleted the collate 2024-09-20 15:16:53 +02:00
Joaquin Ossa
5ac1a65e90 Financial rate metrics 2024-09-20 14:53:43 +02:00
Oriol Roqué Paniagua
b3620cc695 Merged PR 2920: Adapt user migration configuration to take into account V2 migrated users
# Description

Prepares setup to automatically detect V2 migrated users from old dash to new dash by using the new claim type KygMoveDate.

# Checklist

- [X] The edited models and dependants run properly with production data. **Works well with current setup but there's no migrated users yet. We'll need to double check once the launch date has happened**
- [ ] The edited models are sufficiently documented. **N/A**
- [ ] The edited models contain PK tests, and I've ran and passed them. **N/A**
- [ ] 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.

Related work items: #20810
2024-09-20 10:42:12 +00:00
uri
3723cf0e57 DRY on stg cosmos db models 2024-09-19 15:17:33 +02:00
uri
1c1f8ea82e First working version of stg_screening__verifications 2024-09-19 14:54:31 +02:00
Pablo Martin
ea430b1f23 Merge branch 'master' of ssh.dev.azure.com:v3/guardhog/Data/data-dwh-dbt-project 2024-09-19 11:57:18 +02:00
Pablo Martin
cf7a8917a8 add explanatory comment 2024-09-19 11:57:13 +02: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
7ceeabbe7b Revert "commit"
This reverts commit e854f2a99a.
2024-09-18 14:22:33 +02:00
Joaquin Ossa
923bfa7091 Update exposures to pull from version 1 2024-09-18 14:20:48 +02:00
Oriol Roqué Paniagua
94ebe67be1 Merged PR 2898: Remove .sql in the xero__bank_transaction_denom_mart
# Description

Remove .sql in the xero__bank_transaction_denom_mart, effectively fixing the tests that were not running + removing the following warnings:

```
06:15:13  [WARNING]: Did not find matching node for patch with name 'xero__bank_transaction_denom_mart.sql' in the 'models' section of file 'models/reporting/xero/schema.yml'
06:15:14  [WARNING]: Test 'test.dwh_dbt.not_null_xero__bank_transaction_denom_mart.sql_id_line_item.70cdeb323e' (models/reporting/xero/schema.yml) depends on a node named 'xero__bank_transaction_denom_mart.sql' in package '' which was not found
06:15:14  [WARNING]: Test 'test.dwh_dbt.unique_xero__bank_transaction_denom_mart.sql_id_line_item.b85e051d2d' (models/reporting/xero/schema.yml) depends on a node named 'xero__bank_transaction_denom_mart.sql' in package '' which was not found
```

# Checklist

- [X] The edited models and dependants run properly with production data.
- [ ] The edited models are sufficiently documented. *Have not checked*
- [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. *Have not checked*
- [ ] I've picked the right materialization for the affected models. *Have not checked*

# Other

- [ ] Check if a full-refresh is required after this PR is merged.
2024-09-18 12:19:23 +00:00
uri
5620ecbe68 Remove .sql in the xero__bank_transaction_denom_mart 2024-09-18 13:52:55 +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
9e62786aa9 commit2 2024-09-18 11:26:23 +02:00
Pablo Martin
136c297683 add logic 2024-09-17 17:56:56 +02:00
Joaquin Ossa
e854f2a99a commit 2024-09-17 17:22:37 +02:00
Joaquin Ossa
78e7e37c5e Update model core__verification_payments to include amounts without taxes 2024-09-17 17:22:37 +02:00
Joaquin Ossa
17f7b11a79 Merged PR 2885: update int_core__guest_satisfaction_responses to version 2 of verification_pa...
# Description

update int_core__guest_satisfaction_responses to version 2 of verification_payments

# 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: #20044
2024-09-17 15:21:59 +00:00
Joaquin Ossa
2dd4f66189 update int_core__guest_satisfaction_responses to version 2 of verification_payments 2024-09-17 17:12:46 +02:00
Pablo Martín
4bafeba787 Merged PR 2883: Payaway per month and user
# Description

This PR adds an intermediate tables that holds a combo of all payaway plans with the months (technically, combinations of first day and last day of month) when the plan was the relevant one for invoicing purposes.

The goal is to have this as an intermediate helper for some tax related logic in verification payments.

# 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: #20043
2024-09-17 14:13:01 +00:00
Pablo Martin
a20d511b93 missing text 2024-09-17 16:12:38 +02:00
Pablo Martin
049c2d3e31 model and docs+tests 2024-09-17 15:47:45 +02:00
Pablo Martín
140da0a75d Merged PR 2874: Add Payaway table to intermediate
# Description

Brings the Payaway table from staging to intermediate.

The only significant change is that we change the internal Superhog currency id for the iso4217 code.

# 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: #20043
2024-09-17 12:07:07 +00:00
Pablo Martin
f3e9985d0f model and docs 2024-09-17 12:16:52 +02:00
Pablo Martín
07db97b79e Merged PR 2870: Add core.PayAway to staging
# Description

This PR brings the core table `PayAway` into staging, adds documentation and tests.

We are bringing this so we can build right until we reach `int_core__verification_payments_v2`, which needs this info to determine if a waiver was a Superhog-takes-risk type or Host-takes-risk 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: #20043
2024-09-17 09:59:26 +00:00
Pablo Martin
1c04c69e89 fix comments 2024-09-17 11:59:04 +02:00
Pablo Martin
ac87ab4cfd create file 2024-09-17 11:56:21 +02:00
Pablo Martin
624c70872f docs and tests 2024-09-17 11:16:01 +02:00
Pablo Martin
68a9eafb14 typo in file name 2024-09-17 10:36:58 +02:00
Pablo Martin
96d18116ed add staging model 2024-09-17 10:36:43 +02:00
Pablo Martin
68c509050f add payway to sources 2024-09-17 10:32:11 +02:00
Joaquin Ossa
ae1e45a937 Merged PR 2869: Update mtd_aggregated_metrics guest payments to be tax-exclusive
# Description

Update mtd_aggregated_metrics guest payments to be tax-exclusive

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

Update mtd_aggregated_metrics guest payments to be tax-exclusive

Related work items: #20045
2024-09-17 07:27:08 +00: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
Joaquin Ossa
cc837ecd7a Merged PR 2861: Update mtd_aggregated_metrics
# Description

Update mtd_aggregated_metrics for guest payments to be tax-exclusive

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

Update mtd_aggregated_metrics

Related work items: #20045
2024-09-17 07:09:03 +00:00
Joaquin Ossa
b21590ab1d Simplified it 2024-09-17 09:05:38 +02:00
Joaquin Ossa
c3e4a07050 Update mtd_aggregated_metrics 2024-09-17 09:05:38 +02:00
Pablo Martin
60ea19f5ef remove dangling comment 2024-09-17 09:05:38 +02:00
Pablo Martin
fcbaae1381 update schemas 2024-09-17 09:05:38 +02:00
Pablo Martin
fd3b67935b remove old booking metrics 2024-09-17 09:05:37 +02:00
Pablo Martin
bbbfaeabdf refactor booking metrics children to use new models 2024-09-17 09:05:37 +02:00
Pablo Martin
4b5c4d1967 create individual models for each booking metric 2024-09-17 09:04:44 +02:00
Joaquin Ossa
50a8a512fe Update mtd_aggregated_metrics guest payments to be tax-exclusive 2024-09-17 08:38:33 +02:00
Pablo Martín
02520d87ee Merged PR 2858: Split Booking Metrics
# Description

This is a pure refactor PR for optimization purposes.

The PR splits the model `int_core__mtd_booking_metrics` into four different models, one for each of the metrics that were computed in the old model.

The only model that depended on `int_core__mtd_booking_metrics` was `int_mtd_vs_previous_year_metrics`. Now it depends on the four new models instead.

# 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: #21438
2024-09-16 14:34:42 +00:00
Joaquin Ossa
3d8ede273e Simplified it 2024-09-16 16:20:36 +02:00
Joaquin Ossa
54af8af30e Update mtd_aggregated_metrics 2024-09-16 16:01:49 +02:00
Pablo Martin
aeb4538e50 remove dangling comment 2024-09-16 14:45:09 +02:00