new dash new data

This commit is contained in:
Joaquin Ossa 2024-11-12 16:33:55 +01:00
parent 311ddd8678
commit 463f5edfc3
4 changed files with 35 additions and 1 deletions

View file

@ -11,6 +11,7 @@ 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 (
@ -21,7 +22,9 @@ with
uh.company_name,
uh.first_name,
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
@ -64,6 +67,7 @@ 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
@ -72,7 +76,7 @@ with
left join
int_core__accommodation_to_product_bundle atpb
on upb.id_user_product_bundle = atpb.id_user_product_bundle
group by 1, 2, 3, 4, 5, 6, 7
group by 1, 2, 3, 4, 5, 6, 7, 8, 9
)
select
@ -82,7 +86,9 @@ select
company_name,
first_name,
last_name,
email,
account_currency,
user_in_new_dash_since_date_utc,
total_user_product_bundles,
total_active_user_product_bundles,
total_listings,

View file

@ -2428,11 +2428,24 @@ models:
description: |
Information about the host user.
- name: email
data_type: string
description: |
Information about the host user.
- name: account_currency
data_type: string
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: |

View file

@ -9,7 +9,9 @@ select
company_name as company_name,
first_name as first_name,
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,

View file

@ -1164,11 +1164,24 @@ models:
description: |
Information about the host user.
- name: email
data_type: string
description: |
Information about the host user.
- name: account_currency
data_type: string
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: |