Merged PR 2662: New Dash MVP - with. fix on production issue

# Description

Same PR as before, just adds a new commit that fixes my silly issue in prod. I owe some drinks :D

# 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.

Related work items: #19570
This commit is contained in:
Oriol Roqué Paniagua 2024-08-28 10:09:08 +00:00
parent f6f4ca83b7
commit 2facaceec0
4 changed files with 392 additions and 2 deletions

View file

@ -0,0 +1,29 @@
with
int_core__new_dash_user_overview as (
select * from {{ ref("int_core__new_dash_user_overview") }}
)
select
id_user_host as id_user_host,
user_migration_phase as user_migration_phase,
user_estimated_migration_date_utc as user_estimated_migration_date_utc,
company_name as company_name,
first_name as first_name,
last_name as last_name,
account_currency as account_currency,
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,
total_active_listings as total_active_listings,
total_listings_with_product_bundle_with_paid_service
as total_listings_with_product_bundle_with_paid_service,
has_active_listings as has_active_listings,
has_listings_with_paid_service_applied as has_listings_with_paid_service_applied,
has_listings_with_active_paid_service_applied
as has_listings_with_active_paid_service_applied,
total_bookings_with_product_bundle as total_bookings_with_product_bundle,
total_bookings_with_product_bundle_with_paid_service
as total_bookings_with_product_bundle_with_paid_service,
has_bookings_with_product_bundle as has_bookings_with_product_bundle,
has_bookings_with_product_bundle_with_paid_service
as has_bookings_with_product_bundle_with_paid_service
from int_core__new_dash_user_overview

View file

@ -1073,4 +1073,130 @@ models:
The date in which the booking should be invoiced.
This could be the check-in date of the booking or the date in which the guest verification
started, depending on the billing settings of the host.
started, depending on the billing settings of the host.
- name: core__new_dash_user_overview
description: |
This model allows for minimum tracking of how the new dash initative is
performing in the different migrations.
It's a user-centric model in which, for each user, we retrieve some
basic performance indicators in the form of listings and bookings.
columns:
- name: id_user_host
data_type: string
description: |
The unique identifier of this table. It corresponds to the host users
that have been migrated to the New Dashboard.
tests:
- not_null
- unique
- name: user_migration_phase
data_type: string
description: |
The migration phase in which this user was migrated, for informative
purposes.
tests:
- not_null
- name: user_estimated_migration_date_utc
data_type: date
description: |
The estimated date in which this user was migrated.
tests:
- not_null
- name: company_name
data_type: string
description: |
Information about the host user.
- name: first_name
data_type: string
description: |
Information about the host user.
- name: last_name
data_type: string
description: |
Information about the host user.
- name: account_currency
data_type: string
description: |
Currency associated to the host user.
- name: total_user_product_bundles
data_type: integer
description: |
Count of product bundles that this user has or has had.
It contains both active and historic cases.
- name: total_active_user_product_bundles
data_type: integer
description: |
Count of product bundles that this user currently has.
It contains only currently active cases.
- name: total_listings
data_type: integer
description: |
Count of listings that the user owns or has owned.
- name: total_active_listings
data_type: integer
description: |
Count of listings that the user owns.
It contains only those that can accept bookings (hard
activation - not to be confused with activity-based
segmentation).
- name: total_listings_with_product_bundle_with_paid_service
data_type: integer
description: |
Count of listings that have, or have had, a paid service
product bundle activated.
- name: total_listings_with_active_product_bundle_with_paid_service
data_type: integer
description: |
Count of listings that currently have an active paid service
product bundle.
- name: has_active_listings
data_type: integer
description: |
Integer-based flag version of total_active_listings.
- name: has_listings_with_paid_service_applied
data_type: integer
description: |
Integer-based flag version of total_listings_with_product_bundle_with_paid_service.
- name: has_listings_with_active_paid_service_applied
data_type: integer
description: |
Integer-based flag version of total_listings_with_active_product_bundle_with_paid_service.
- name: total_bookings_with_product_bundle
data_type: integer
description: |
Count of bookings that have a product bundle associated.
- name: total_bookings_with_product_bundle_with_paid_service
data_type: integer
description: |
Count of bookings that have a product bundle associated that contain
a paid service.
- name: has_bookings_with_product_bundle
data_type: integer
description: |
Integer-based flag version of total_bookings_with_product_bundle.
- name: has_bookings_with_product_bundle_with_paid_service
data_type: integer
description: |
Integer-based flag version of total_bookings_with_product_bundle_with_paid_service.