Merged PR 2828: Exposing Deal info to reporting
# Description Exposes the 2 new deal fields to reporting to make it accessible for 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. Exposing Deal info to reporting Related work items: #18911, #19083
This commit is contained in:
commit
2295679fc9
2 changed files with 16 additions and 1 deletions
|
|
@ -9,6 +9,8 @@ select
|
|||
day as day,
|
||||
date as date,
|
||||
id_deal as id_deal,
|
||||
main_deal_name as main_deal_name,
|
||||
main_billing_country_iso_3_per_deal as main_billing_country_iso_3_per_deal,
|
||||
deal_lifecycle_state as deal_lifecycle_state,
|
||||
created_bookings as created_bookings,
|
||||
check_out_bookings as check_out_bookings,
|
||||
|
|
@ -28,7 +30,7 @@ select
|
|||
listings_booked_in_month as listings_booked_in_month,
|
||||
listings_booked_in_6_months as listings_booked_in_6_months,
|
||||
listings_booked_in_12_months as listings_booked_in_12_months,
|
||||
-- Avoid displaying revenue figures until invoicing period finishes
|
||||
-- Avoid displaying revenue figures until invoicing period finishes
|
||||
case
|
||||
when {{ is_date_before_previous_month("date") }}
|
||||
then total_revenue_in_gbp
|
||||
|
|
|
|||
|
|
@ -470,6 +470,19 @@ models:
|
|||
tests:
|
||||
- not_null
|
||||
|
||||
- name: main_deal_name
|
||||
data_type: string
|
||||
description: |
|
||||
Main name for this ID deal.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: main_billing_country_iso_3_per_deal
|
||||
data_type: string
|
||||
description: |
|
||||
ISO 3166-1 alpha-3 main country code in which the Deal is billed.
|
||||
In some cases it's null.
|
||||
|
||||
- name: year
|
||||
data_type: int
|
||||
description: year number of the given date.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue