data-dwh-dbt-project/models/intermediate/xero
Oriol Roqué Paniagua 556a52e991 Merged PR 2689: KPIs by Billing Country
# Description

Adds Billing Country dimension in KPIs, but does not expose them to reporting yet.
Silly thing, based on the macros I built, I cannot make incremental changes unless changing all models. This will need to be adapted, happy to hear your thoughts on how we do it.
Additionally, I have lack of performance of the model `mtd_guest_payments_metrics`. It takes around 5 min to execute, but technically the end-to-end runs in one shoot without breaking.
It's a complex PR because it changes many files, but you will see that:
* It mostly changes the join conditions for the dimensions or the schema tests,
* I tried to be very careful and add things step-by-step in the commits.

Goal is NOT to complete the PR yet until we see how we can improve performance. I can say though that data end-to-end looks ok to me, but would benefit from checking with production data for the new dimension

Update 30th Aug
* Added a new commit that includes `id_user_host` in `int_core__verification_payments`. Happy to discuss if it makes sense or not. But it changes the execution from ~600 sec to ~6 sec because it avoids a massive repeated join with `verification_requests`.

# 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.
- [ ] I've picked the right materialization for the affected models. **To check because of performance issues**

# Other

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

Related work items: #19082
2024-09-04 10:17:12 +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 2689: KPIs by Billing Country 2024-09-04 10:17:12 +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 2689: KPIs by Billing Country 2024-09-04 10:17:12 +00:00