Updated logic of model

This commit is contained in:
Joaquin Ossa 2025-01-15 12:03:25 +01:00
parent b063454409
commit 261c6d3c49
2 changed files with 21 additions and 10 deletions

View file

@ -1714,12 +1714,22 @@ models:
each new deal. It is calculated by taking the total revenue generated by all
active accounts over the last 12 months and dividing it by the number of active
months for each account."
data_tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date
- main_billing_country_iso_3
- hubspot_listing_segmentation
columns:
- name: date
data_type: date
description: |
"Last date of the month for which the data is reported.
It considers the data from the previous 12 months up to the date."
"Date representing the last day of the month. The metrics are calculated using data
from the 12 months leading up to and including this date. Along with
`main_billing_country_iso_3` and `hubspot_listing_segmentation`, this field serves
as part of the primary key for the model."
data_tests:
- not_null
- is_last_day_of_month
@ -1727,7 +1737,7 @@ models:
- name: main_billing_country_iso_3
data_type: text
description: |
"ISO 3166-1 alpha-3 main country code in which the Deals are billed"
"Main billing country code from ISO 3166"
data_tests:
- not_null