Added year and month
This commit is contained in:
parent
1245a88867
commit
24d13185eb
2 changed files with 17 additions and 1 deletions
|
|
@ -11,6 +11,8 @@ with
|
|||
int_core__accommodation as (select * from {{ ref("int_core__accommodation") }})
|
||||
select
|
||||
d.id_deal,
|
||||
extract(year from d.cancellation_date_utc) as cancellation_year,
|
||||
extract(month from d.cancellation_date_utc) as cancellation_month,
|
||||
d.cancellation_date_utc,
|
||||
d.live_date_utc,
|
||||
case
|
||||
|
|
@ -105,4 +107,4 @@ inner join
|
|||
int_core__user_host uh on d.id_deal = uh.id_deal and uh.is_test_account = false
|
||||
left join int_core__accommodation a on uh.id_user_host = a.id_user_host
|
||||
where d.cancellation_date_utc is not null
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||
group by 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
|
||||
|
|
|
|||
|
|
@ -2762,6 +2762,20 @@ models:
|
|||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: cancellation_year
|
||||
data_type: integer
|
||||
description: "Year when the deal was offboarded according to
|
||||
Hubspot."
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: cancellation_month
|
||||
data_type: integer
|
||||
description: "Month when the deal was offboarded according to
|
||||
Hubspot."
|
||||
data_tests:
|
||||
- not_null
|
||||
|
||||
- name: cancellation_date_utc
|
||||
data_type: date
|
||||
description: "Date when the deal was offboarded according to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue