data-dwh-dbt-project/models/intermediate/xero
Oriol Roqué Paniagua 2130226939 Merged PR 2284: KPIs: computing invoicing metrics from Xero
This PR creates 2 new models on intermediate, xero:
- int_xero__mtd_invoicing_metrics (global view)
- int_xero__monthly_invoicing_history_by_deal (by deal view)

This allows for the computation of host metrics (operators), as well as host resolution payments. This will enable in the future to compute total revenue and weighted revenue metrics.
The data displayed from the previous months in the mtd_invoicing_metrics is consistent with 1) revenue figures displayed in business overview for Host tab, as well as Guest tab for Waiver Payments; and 2) host payment figures displayed in the accounting reports.

**Note 1**: the variables at this stage are reused in these models, as well as many other Xero models. We still need to handle the refactor ticket on Xero related reports. This is not under the scope of this PR.

**Note 2**: we noticed that the strategy for mtd models to do a double year, month extraction join is badly performant. Actually, resolution payments subquery was not performing at all with this logic. So it has been changed to a date_trunc('month', related_date)::date = d.first_day_month strategy which works much faster. I'll add a standalone PR to refactor the remaining mtd models separately later

Related work items: #18108, #18110
2024-07-12 10:05:49 +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 more credit note work 2024-05-17 14:32:06 +02: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 lots of currency stuff 2024-05-14 12:26:02 +02: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 2284: KPIs: computing invoicing metrics from Xero 2024-07-12 10:05:49 +00:00
int_xero__mtd_invoicing_metrics.sql Merged PR 2284: KPIs: computing invoicing metrics from Xero 2024-07-12 10:05:49 +00:00
int_xero__sales_denom_mart.sql remove duplicated currency field 2024-07-08 17:26:02 +02:00
schema.yaml Merged PR 2284: KPIs: computing invoicing metrics from Xero 2024-07-12 10:05:49 +00:00