addressed comments
This commit is contained in:
parent
463f5edfc3
commit
6f77309b8c
4 changed files with 11 additions and 21 deletions
|
|
@ -11,12 +11,12 @@ with
|
|||
int_core__accommodation_to_product_bundle as (
|
||||
select * from {{ ref("int_core__accommodation_to_product_bundle") }}
|
||||
),
|
||||
int_core__new_dash_users as (select * from {{ ref("int_core__new_dash_users") }}),
|
||||
|
||||
user_aggregation as (
|
||||
|
||||
select
|
||||
upb.id_user_host,
|
||||
uh.id_deal,
|
||||
uh.new_dash_version as user_migration_phase,
|
||||
uh.user_in_new_dash_since_date_utc as user_estimated_migration_date_utc,
|
||||
uh.company_name,
|
||||
|
|
@ -24,7 +24,6 @@ with
|
|||
uh.last_name,
|
||||
uh.email,
|
||||
uh.account_currency_iso4217 as account_currency,
|
||||
ndu.user_in_new_dash_since_date_utc,
|
||||
count(distinct upb.id_user_product_bundle) as total_user_product_bundles,
|
||||
count(
|
||||
distinct case
|
||||
|
|
@ -67,7 +66,6 @@ with
|
|||
end
|
||||
) as total_bookings_with_product_bundle_with_paid_service
|
||||
from int_core__user_product_bundle upb
|
||||
inner join int_core__new_dash_users ndu on upb.id_user_host = ndu.id_user_host
|
||||
inner join int_core__user_host uh on upb.id_user_host = uh.id_user_host
|
||||
left join
|
||||
int_core__booking_to_product_bundle btpb
|
||||
|
|
@ -81,6 +79,7 @@ with
|
|||
)
|
||||
select
|
||||
id_user_host,
|
||||
id_deal,
|
||||
user_migration_phase,
|
||||
user_estimated_migration_date_utc,
|
||||
company_name,
|
||||
|
|
@ -88,7 +87,6 @@ select
|
|||
last_name,
|
||||
email,
|
||||
account_currency,
|
||||
user_in_new_dash_since_date_utc,
|
||||
total_user_product_bundles,
|
||||
total_active_user_product_bundles,
|
||||
total_listings,
|
||||
|
|
|
|||
|
|
@ -2398,6 +2398,10 @@ models:
|
|||
- not_null
|
||||
- unique
|
||||
|
||||
- name: id_deal
|
||||
data_type: character varying
|
||||
description: The ID for the Deal.
|
||||
|
||||
- name: user_migration_phase
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -2438,14 +2442,6 @@ models:
|
|||
description: |
|
||||
Currency associated to the host user.
|
||||
|
||||
- name: user_in_new_dash_since_date_utc
|
||||
data_type: integer
|
||||
description: |
|
||||
For users that are in New Dash, the effective date since
|
||||
these users can be considered in New Dash. It the user
|
||||
has moved from Old Dash, it will be the new_dash_move_date_utc.
|
||||
If not, it will correspond to the joined_date_utc.
|
||||
|
||||
- name: total_user_product_bundles
|
||||
data_type: integer
|
||||
description: |
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ with
|
|||
)
|
||||
select
|
||||
id_user_host as id_user_host,
|
||||
id_deal as id_deal,
|
||||
user_migration_phase as user_migration_phase,
|
||||
user_estimated_migration_date_utc as user_estimated_migration_date_utc,
|
||||
company_name as company_name,
|
||||
|
|
@ -11,7 +12,6 @@ select
|
|||
last_name as last_name,
|
||||
email as email,
|
||||
account_currency as account_currency,
|
||||
user_in_new_dash_since_date_utc as user_in_new_dash_since_date_utc,
|
||||
total_user_product_bundles as total_user_product_bundles,
|
||||
total_active_user_product_bundles as total_active_user_product_bundles,
|
||||
total_listings as total_listings,
|
||||
|
|
|
|||
|
|
@ -1134,6 +1134,10 @@ models:
|
|||
- not_null
|
||||
- unique
|
||||
|
||||
- name: id_deal
|
||||
data_type: character varying
|
||||
description: The ID for the Deal.
|
||||
|
||||
- name: user_migration_phase
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -1174,14 +1178,6 @@ models:
|
|||
description: |
|
||||
Currency associated to the host user.
|
||||
|
||||
- name: user_in_new_dash_since_date_utc
|
||||
data_type: integer
|
||||
description: |
|
||||
For users that are in New Dash, the effective date since
|
||||
these users can be considered in New Dash. It the user
|
||||
has moved from Old Dash, it will be the new_dash_move_date_utc.
|
||||
If not, it will correspond to the joined_date_utc.
|
||||
|
||||
- name: total_user_product_bundles
|
||||
data_type: integer
|
||||
description: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue