From a0ee26e018c643c52aa69d9ef97c5b26bb0e0b15 Mon Sep 17 00:00:00 2001 From: Joaquin Ossa Date: Fri, 10 Jan 2025 09:17:29 +0100 Subject: [PATCH] pms data for Account Managers Overview --- .../cross/int_monthly_growth_score_by_deal.sql | 8 ++++++++ models/intermediate/cross/schema.yml | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/models/intermediate/cross/int_monthly_growth_score_by_deal.sql b/models/intermediate/cross/int_monthly_growth_score_by_deal.sql index d834a33..90c5566 100644 --- a/models/intermediate/cross/int_monthly_growth_score_by_deal.sql +++ b/models/intermediate/cross/int_monthly_growth_score_by_deal.sql @@ -12,6 +12,8 @@ with date_trunc('month', date)::date as first_day_month, id_deal, main_deal_name, + has_active_pms, + active_pms_list, main_billing_country_iso_3_per_deal, deal_lifecycle_state, coalesce(total_revenue_in_gbp, 0) as revenue_in_gbp, @@ -91,6 +93,8 @@ with -- Deal Attributes given_month.main_deal_name, + given_month.has_active_pms, + given_month.active_pms_list, given_month.main_billing_country_iso_3_per_deal, given_month.deal_lifecycle_state, @@ -242,6 +246,8 @@ with m.id_deal, m.main_deal_name, + m.has_active_pms, + m.active_pms_list, m.main_billing_country_iso_3_per_deal, m.deal_lifecycle_state, @@ -346,6 +352,8 @@ select gsc.id_deal, gsc.main_deal_name, + gsc.has_active_pms, + gsc.active_pms_list, gsc.main_billing_country_iso_3_per_deal, gsc.deal_lifecycle_state, d.deal_hubspot_stage, diff --git a/models/intermediate/cross/schema.yml b/models/intermediate/cross/schema.yml index c5d87e2..558b10f 100644 --- a/models/intermediate/cross/schema.yml +++ b/models/intermediate/cross/schema.yml @@ -446,6 +446,19 @@ models: tests: - not_null + - name: has_active_pms + data_type: boolean + description: | + Does the deal have an active associated PMS. + tests: + - not_null + + - name: active_pms_list + data_type: string + description: | + Name of the active PMS associated with the deal. It can have more than + one PMS associated with it. It can be null if it doesn't have any PMS associated. + - name: main_billing_country_iso_3_per_deal data_type: string description: |