Commit graph

392 commits

Author SHA1 Message Date
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
Joaquin Ossa
9a74e21783 Fixed description 2024-07-11 09:53:01 +02:00
Joaquin Ossa
f96587dc33 Added report to exposure.yaml 2024-07-11 09:07:22 +02:00
Oriol Roqué Paniagua
3b75d9eefb Merged PR 2257: Expose guest revenue and guest journey payment metrics
This PR aims to expose the new metrics to the business KPIs report.
The new metrics exposed are, for the global and the by deal view:
- Guest Revenue
- Guest Revenue per Guest Journey Completed
- Guest Revenue per Guest Journey with Payment
- Guest Payments
- Guest Payments per Guest Journey Completed
- Guest Payments per Guest Journey with Payment
- Guest Journey with Payment
- Guest Journey Payment Rate

Changes:
- Silly change on the naming in the by deal view of `payment_rate_guest_journey` to be consistent with the global view.
- Silly change that I miss some GJ payment metric for the view by deal id.
- Added a new number format called `currency_gbp` - only for monetary metrics, available in the schema files
- Usual procedure to publish metrics: for global metrics, add them in the `int_mtd_aggregated_metrics`. I also changed the order of display.
- **Important**: to avoid displaying revenue figures until Xero invoicing is handled, I created a macro called `is_date_before_previous_month` that is called in the reporting equivalent models: `mtd_aggregated_metrics` in the where section and in the `monthly_aggregated_metrics_history_by_deal` as a case-when.

This should allow to expose all new metrics, and enable the publishing of a new update of the business kpis!

Related work items: #18107
2024-07-10 14:17:05 +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
Pablo Martin
1d63e187c2 model and docs 2024-07-09 15:31:47 +02:00
Pablo Martin
42811b6c7e propagate field in reporting layer 2024-07-08 16:48:39 +02: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
Joaquin Ossa
5867b53e55 Fixed indentation 2024-07-03 15:01:07 +02:00
Joaquin Ossa
af4ab70b96 Addresed Uri's comments and also included new reports in exposures.ymal 2024-07-03 12:29:01 +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
Pablo Martín
915b9d5165 Merged PR 2161: Sign for bank transactions
The bank transactions table coming from Xero has positive amounts for all transactions by default.

Nevertheless, some transactions are receiving and some are sending.

This PR implements sign for transactions amounts throughout the DWH so that aggregations work properly.

I've also left the transaction sign column in some spots since it might be useful for some aggregation wizardry (ie cancel out receiving transactions in resolutions so that counts are more accurate).

Related work items: #17551
2024-07-01 12:02:25 +00:00
Pablo Martin
dd5882a564 propagate transaction sign 2024-07-01 11:44:55 +02:00
Pablo Martin
0e9c608894 more docs 2024-07-01 11:39:40 +02:00
Pablo Martin
f0f6382bbd update docs 2024-07-01 11:34:26 +02: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
Pablo Martin
69ad42af63 model and schema 2024-06-26 15:35:44 +02:00
Pablo Martin
b3263e82b1 docs typos 2024-06-26 13:40:07 +02:00
Pablo Martin
e8f9432507 add docs and tablesfor table 2024-06-26 11:43:29 +02:00
Pablo Martin
a22d85340d reporting model 2024-06-26 11:24:34 +02:00
Pablo Martin
5182a804b2 fix typos 2024-06-25 17:09:02 +02:00
Pablo Martin
be24725b7d remove a couple of wrong tests 2024-06-25 16:44:19 +02:00
Pablo Martin
f9fcb76ed1 schemas 2024-06-25 16:42:40 +02:00
Pablo Martin
86ca7411af remove line items: they have their own tables now 2024-06-25 16:41:41 +02:00
Pablo Martin
5fbf5a76fd add documentation placeholder 2024-06-25 16:25:26 +02:00
Pablo Martin
71278abbb9 remove outdated docs 2024-06-25 16:25:26 +02:00
Pablo Martin
8b1d949f73 add bank transactions to reporting 2024-06-25 16:25:26 +02:00
Joaquin Ossa
31feff162a Fixed names of tables 2024-06-19 11:59:45 +02:00
Joaquin Ossa
f64b17a223 Created currency exchange tables 2024-06-19 11:52:28 +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
uri
c8807ddf60 Adding exposure of main kpis dashboard 2024-06-17 14:04:51 +02: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
Oriol Roqué Paniagua
3610c447f5 Merged PR 1949: Fix documentation in DWH and include exposure
Related work items: #16857
2024-05-30 10:37:41 +00:00
uri
f021f3cb29 Changed schema.yaml with the correct field 2024-05-30 10:03:05 +02:00
uri
e360c1c785 Setting xero__net_fees_by_deal as per deal id, not dedicated to guesty 2024-05-30 10:00:39 +02:00
uri
bf0010ceeb Adding model xero__net_fees_by_deal documentation in schema.yaml. Added Waiver Fees in xero__net_fees documentation. 2024-05-30 09:15:53 +02:00