Merged PR 4616: Adds first day month for reporting purposes
# Description Just adds the first day of the month for AM models. The problem is that the display of the graph and the value shown are misleading. This aims to fix it. I hate PBI. # 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. - [X] I have checked for DRY opportunities with other models and docs. - [X] I've picked the right materialization for the affected models. # Other - [ ] Check if a full-refresh is required after this PR is merged. Adds first day month for reporting purposes Related work items: #28181
This commit is contained in:
parent
5d6e860e2b
commit
5ddbe5d5af
3 changed files with 16 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ with
|
||||||
|
|
||||||
select
|
select
|
||||||
date as date,
|
date as date,
|
||||||
|
date_trunc('month', date)::date as first_day_month,
|
||||||
id_deal as id_deal,
|
id_deal as id_deal,
|
||||||
time_window as time_window,
|
time_window as time_window,
|
||||||
metric_from_date as metric_from_date,
|
metric_from_date as metric_from_date,
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ with
|
||||||
)
|
)
|
||||||
select
|
select
|
||||||
date as date,
|
date as date,
|
||||||
|
date_trunc('month', date)::date as first_day_month,
|
||||||
id_deal as id_deal,
|
id_deal as id_deal,
|
||||||
|
|
||||||
client_type as client_type,
|
client_type as client_type,
|
||||||
main_deal_name as main_deal_name,
|
main_deal_name as main_deal_name,
|
||||||
has_active_pms as has_active_pms,
|
has_active_pms as has_active_pms,
|
||||||
|
|
|
||||||
|
|
@ -641,6 +641,13 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
|
- name: first_day_month
|
||||||
|
data_type: date
|
||||||
|
description: |
|
||||||
|
First day of the month corresponding to the date field.
|
||||||
|
data_tests:
|
||||||
|
- not_null
|
||||||
|
|
||||||
- name: client_type
|
- name: client_type
|
||||||
data_type: string
|
data_type: string
|
||||||
description: |
|
description: |
|
||||||
|
|
@ -1479,6 +1486,13 @@ models:
|
||||||
data_tests:
|
data_tests:
|
||||||
- not_null
|
- not_null
|
||||||
|
|
||||||
|
- name: first_day_month
|
||||||
|
data_type: date
|
||||||
|
description: |
|
||||||
|
First day of the month corresponding to the date field.
|
||||||
|
data_tests:
|
||||||
|
- not_null
|
||||||
|
|
||||||
- name: id_deal
|
- name: id_deal
|
||||||
data_type: character varying
|
data_type: character varying
|
||||||
description: Id of the deal associated to the host.
|
description: Id of the deal associated to the host.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue