From 747fa1b731297dcfda02d99f46f415aa3a615d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Roqu=C3=A9=20Paniagua?= Date: Tue, 20 May 2025 05:53:30 +0000 Subject: [PATCH] Merged PR 5261: Adds contract signed month in onboarding reporting # Description Adds contract signed month + not null test # 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. - [ ] I have checked for DRY opportunities with other models and docs. - [ ] 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: #30249 --- models/reporting/general/new_dash_deal_onboarding.sql | 1 + models/reporting/general/schema.yml | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/models/reporting/general/new_dash_deal_onboarding.sql b/models/reporting/general/new_dash_deal_onboarding.sql index 64bca25..2377027 100644 --- a/models/reporting/general/new_dash_deal_onboarding.sql +++ b/models/reporting/general/new_dash_deal_onboarding.sql @@ -21,6 +21,7 @@ select count_upgraded_programs_at_listing_level, count_active_upgraded_programs_at_active_listing_level, contract_signed_date_utc, + date_trunc('month', contract_signed_date_utc)::date as contract_signed_month, live_date_utc, cancellation_date_utc, backend_account_creation_utc, diff --git a/models/reporting/general/schema.yml b/models/reporting/general/schema.yml index 20cf9fd..393dbd0 100644 --- a/models/reporting/general/schema.yml +++ b/models/reporting/general/schema.yml @@ -2868,6 +2868,16 @@ models: data_type: date description: | Date in which the contract was signed according to HubSpot. + data_tests: + - not_null + + - name: contract_signed_month + data_type: date + description: | + First day of the month in which the contract was signed according + to HubSpot. + data_tests: + - not_null - name: live_date_utc data_type: date