data-dwh-dbt-project/models/intermediate/xero
Oriol Roqué Paniagua 80abac494a Merged PR 2583: Invoicing metrics per customer segmentation
# Description

Silly change:

* Modifies `int_core__mtd_guest_payments_metrics` to apply the proper key on date, dimension and dimension_value.
* -> *The weird thing is that the previous dbt test I run worked well. Is it possible that the configuration in the schema file prevails on top of the model configuration? I thought it was the other way around...*

Main changes:

* Modifies `int_xero__mtd_invoicing_metrics` to include the customer segmentation based on listings.
* `schema.yaml` is also affected including new fields and tests
* Added the macro to retrieve the production dimension in `int_core__mtd_vs_previous_year_metrics` to avoid propagating this upwards and messing up with the data display.

Overall, follows a similar strategy as we did for Booking, Guest Journey, Deal, Accommodation and Guest Payments metrics. For reference, [here's the previous PR on Guest Payments](https://guardhog.visualstudio.com/Data/_git/data-dwh-dbt-project/pullrequest/2580).

This is the last PR on the source models for KPIs. Will follow: propagation + exposure

# Checklist

- [X] The edited models and dependants run properly with production data.
* **Important note**: this segmentation provides null values for all API-related KPIs. Makes sense, since the 4 deal id we have for APIs do NOT have, or have had, a listing linked to them. I'd say it's not a blocker.
- [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: #19325
2024-08-20 12:05:53 +00:00
..
int_xero__bank_transaction_line_items.sql apply transaction sign in line items 2024-07-01 11:45:03 +02:00
int_xero__bank_transactions.sql propagate transaction sign 2024-07-01 11:44:55 +02:00
int_xero__contacts.sql a few small details 2024-05-14 16:20:48 +02:00
int_xero__credit_note_line_items.sql Merged PR 2349: Retrieve account for xero invoices, credit notes and sales denom mart 2024-07-18 15:47:14 +00:00
int_xero__credit_notes.sql Revert "remove unnecessary nested objects since they can be joined in dwh" 2024-05-23 16:23:52 +02:00
int_xero__invoice_line_items.sql Merged PR 2349: Retrieve account for xero invoices, credit notes and sales denom mart 2024-07-18 15:47:14 +00:00
int_xero__invoices.sql propagate field to int 2024-07-08 16:31:53 +02:00
int_xero__monthly_invoicing_history_by_deal.sql Merged PR 2429: Business KPIs - Revenue details 2024-07-29 13:16:19 +00:00
int_xero__mtd_invoicing_metrics.sql Merged PR 2583: Invoicing metrics per customer segmentation 2024-08-20 12:05:53 +00:00
int_xero__sales_denom_mart.sql Merged PR 2349: Retrieve account for xero invoices, credit notes and sales denom mart 2024-07-18 15:47:14 +00:00
schema.yaml Merged PR 2583: Invoicing metrics per customer segmentation 2024-08-20 12:05:53 +00:00