Merged PR 3373: Setting current KPIs models for deprecation

# Description

Sets up warning for KPIs models that will be deprecated, which are:
* 13 in core
* 2 in xero
* 5 in cross

I will keep alive the cross models that handle the final aggregations for Main KPIs for the time being, as well as the newly created Churn model that has a dependency on the monthly by deal to be filled into the mtd flow. I think handling exposure logic for Main KPIs could be a separated migration.

In other words, this is already quite a bit to migrate.

# Checklist

 **I just checked that dbt compiles correctly**

- [NA] The edited models and dependants run properly with production data.
- [NA] The edited models are sufficiently documented.
- [NA] The edited models contain PK tests, and I've ran and passed them.
- [NA] I have checked for DRY opportunities with other models and docs.
- [NA] 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: #23268
This commit is contained in:
Oriol Roqué Paniagua 2024-10-30 08:54:59 +00:00
parent 5c1f6f88f2
commit 450975301a
3 changed files with 70 additions and 30 deletions

View file

@ -3,34 +3,34 @@ version: 2
models:
- name: int_xero__invoices
columns:
- name: id_invoice
tests:
- not_null
- unique
- name: id_invoice
tests:
- not_null
- unique
- name: int_xero__credit_notes
columns:
- name: id_credit_note
tests:
- not_null
- unique
- name: id_credit_note
tests:
- not_null
- unique
- name: int_xero__invoice_line_items
columns:
- name: id_line_item
tests:
- not_null
- unique
- name: id_line_item
tests:
- not_null
- unique
- name: int_xero__credit_note_line_items
columns:
- name: id_line_item
tests:
- not_null
- unique
- name: id_line_item
tests:
- not_null
- unique
- name: int_xero__bank_transactions
columns:
- name: id_bank_transaction
tests:
- not_null
- unique
- name: id_bank_transaction
tests:
- not_null
- unique
- name: int_xero__sales_denom_mart
description: |
@ -58,7 +58,7 @@ models:
Fields are not documented here: you can find more details in upstream
models.
columns:
- name: id_line_item
data_type: text
@ -79,9 +79,9 @@ models:
- not_null
- accepted_values:
values:
- 'invoice'
- 'credit note'
- "invoice"
- "credit note"
- name: id_account
data_type: text
description: ""
@ -265,12 +265,14 @@ models:
This model contains the historic information regarding invoicing metrics for each deal id.
It's used for the business KPIs in the view by deal id. Data is aggregated at the last
day of the month, or up to yesterday if it's the current month.
tests:
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date
- id_deal
deprecation_date: 2024-11-30
columns:
- name: date
data_type: date
@ -280,7 +282,7 @@ models:
- name: id_deal
data_type: character varying
description: Id of the deal associated to the host.
description: Id of the deal associated to the host.
tests:
- not_null
@ -291,13 +293,15 @@ models:
It's used for the business KPIs. Data is aggregated at the last day of the month and in the
days necessary for the Month-to-Date computation of the current month.
tests:
deprecation_date: 2024-11-30
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date
- dimension
- dimension_value
columns:
- name: date
data_type: date
@ -310,11 +314,11 @@ models:
description: The dimension or granularity of the metrics.
tests:
- accepted_values:
values:
values:
- global
- by_number_of_listings
- by_billing_country
- name: dimension_value
data_type: string
description: The value or segment available for the selected dimension.