wip fixing deals from hubspot

This commit is contained in:
Joaquin Ossa 2025-01-29 10:05:41 +01:00
parent cf024f7b71
commit 26898322e7
6 changed files with 136 additions and 213 deletions

View file

@ -1707,7 +1707,7 @@ models:
data_type: boolean
description: "Flag to indicate if the deal is in Xero."
- name: int_monthly_onboarding_mrr_metrics
- name: int_monthly_onboarding_mrr_per_deal
description: |
"This table provides data on the Onboarding Monthly Recurring Revenue (MRR).
The Onboarding MRR is an estimate of the expected monthly revenue generated by
@ -1719,68 +1719,40 @@ models:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- date
- main_billing_country_iso_3
- hubspot_listing_segmentation
- dimension
- dimension_value
columns:
- name: date
data_type: date
description: |
"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
- name: main_billing_country_iso_3
data_type: text
description: |
"Main billing country code from ISO 3166"
description: The date for the month-to-date metrics.
data_tests:
- not_null
- name: hubspot_listing_segmentation
data_type: text
description: |
"Segmentation based on the number of properties specified by each deal
in HubSpot."
- name: dimension
data_type: string
description: The dimension or granularity of the metrics.
data_tests:
- not_null
- accepted_values:
values:
- "01-05"
- "06-20"
- "21-60"
- "61+"
- "global"
- global
- by_number_of_listings
- by_billing_country
- name: total_revenue_in_gbp
data_type: numeric
description: |
"Total revenue accumulated by all active accounts over the last 12 months."
- name: dimension_value
data_type: string
description: The value or segment available for the selected dimension.
data_tests:
- not_null
- name: total_active_months
data_type: numeric
description: |
"Total number of active months for all accounts over the last 12 months."
data_tests:
- not_null
- dbt_expectations.expect_column_values_to_be_between:
min_value: 0
strictly: false
- name: expected_mrr
- name: expected_mrr_per_deal
data_type: numeric
description: |
"Expected MRR for each new deal."
data_tests:
- not_null
- name: int_mtd_agg_onboarding_mrr_metrics
- name: int_mtd_agg_onboarding_mrr_revenue
description: |
This model contains the month-to-date aggregated metrics for the onboarding MRR.
It includes the expected MRR per deal and the total expected MRR, which is obtained
@ -1820,10 +1792,6 @@ models:
data_type: numeric
description: Number of new deals in the month.
- name: expected_mrr_per_deal
data_type: numeric
description: Expected Onboarding MRR per new deal.
- name: expected_mrr
data_type: numeric
description: |