Merge branch 'master' of ssh.dev.azure.com:v3/guardhog/Data/data-dwh-dbt-project
This commit is contained in:
commit
d73ca6555c
4 changed files with 395 additions and 3 deletions
|
|
@ -1694,6 +1694,7 @@ models:
|
|||
- PropertyVerificationManager
|
||||
- CheckInHeroApi
|
||||
- CancellationApi
|
||||
- ScreenAndProtectAPI
|
||||
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
|
|
@ -1725,6 +1726,7 @@ models:
|
|||
- PropertyVerificationManager
|
||||
- CheckInHeroApi
|
||||
- CancellationApi
|
||||
- ScreenAndProtectApi
|
||||
|
||||
- name: int_core__user_host
|
||||
description: |
|
||||
|
|
@ -1740,10 +1742,14 @@ models:
|
|||
- KnowYourGuest
|
||||
- ScreeningAPI
|
||||
- PropertyVerificationManager
|
||||
- CancellationApi
|
||||
- CheckInHeroApi
|
||||
- ScreenAndProtectApi
|
||||
Additionally, any user that has any of these claim types will be considered as a Host:
|
||||
- KygRegistrationSignUpType
|
||||
- KygRegistrationIntegrationTypeName
|
||||
- KygMvp
|
||||
- NewDashVersion
|
||||
Lastly, in case a user satisfies multiple conditions, it will only appear once in this table.
|
||||
|
||||
columns:
|
||||
|
|
@ -1882,7 +1888,7 @@ models:
|
|||
data_type: timestamp
|
||||
description: |
|
||||
For users that are in New Dash, the effective date since
|
||||
these users can be considered in New Dash. It the user
|
||||
these users can be considered in New Dash. If the user
|
||||
has moved from Old Dash, it will be the new_dash_move_at_utc.
|
||||
If not, it will correspond to the joined_at_utc.
|
||||
|
||||
|
|
@ -1934,7 +1940,7 @@ models:
|
|||
data_type: timestamp
|
||||
description: |
|
||||
For users that are in New Dash, the effective date since
|
||||
these users can be considered in New Dash. It the user
|
||||
these users can be considered in New Dash. If the user
|
||||
has moved from Old Dash, it will be the new_dash_move_at_utc.
|
||||
If not, it will correspond to the joined_at_utc.
|
||||
|
||||
|
|
@ -3206,6 +3212,12 @@ models:
|
|||
- not_null
|
||||
- unique
|
||||
|
||||
- name: id_verification_request
|
||||
data_type: bigint
|
||||
description:
|
||||
The identifier of the verification request. It acts as Foreign Key to
|
||||
Verification Request table. It can be null.
|
||||
|
||||
- name: id_verification
|
||||
data_type: bigint
|
||||
description: |
|
||||
|
|
@ -3224,6 +3236,11 @@ models:
|
|||
The identifier of the protection plan, aka protection service. It acts as
|
||||
Foreign Key to Product Plan table. It can be null.
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: |
|
||||
Unique identifier of the account. It can be null.
|
||||
|
||||
- name: id_user_host
|
||||
data_type: string
|
||||
description: |
|
||||
|
|
@ -3314,6 +3331,29 @@ models:
|
|||
Iso 4217 currency code for the account of the Host.
|
||||
It can be null.
|
||||
|
||||
- name: is_user_in_new_dash
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to determine if this user host is in New Dash or not.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: new_dash_version
|
||||
data_type: string
|
||||
description: |
|
||||
For users that are in New Dash, specifies the New Dash Version
|
||||
in which these users were moved or joined. It can be null if
|
||||
the user is not in new dash.
|
||||
|
||||
- name: user_in_new_dash_since_timestamp_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
For users that are in New Dash, the effective date since
|
||||
these users can be considered in New Dash. If the user
|
||||
has moved from Old Dash, it will be the new_dash_move_at_utc.
|
||||
If not, it will correspond to the joined_at_utc. It can be null
|
||||
if the user is not in new dash.
|
||||
|
||||
- name: is_missing_host_currency_code
|
||||
data_type: boolean
|
||||
description: |
|
||||
|
|
@ -3573,3 +3613,242 @@ models:
|
|||
meaning, it's not a Basic Screening.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: int_core__booking_summary
|
||||
description: |
|
||||
This model contains enriched information aggregated at Booking level regarding
|
||||
the services that are applied within a Booking.
|
||||
Specifically, contains both Booking and Services attributes (aggregated), as well
|
||||
as the total price in GBP at this specific moment in time. In other words,
|
||||
it's the snapshot of the current status of the Booking.
|
||||
It's a subset of all bookings since it only applies to bookings that come from
|
||||
hosts that have been migrated into the New Dash or New Pricing.
|
||||
tests:
|
||||
- dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B:
|
||||
column_A: booking_check_out_at_utc
|
||||
column_B: booking_check_in_at_utc
|
||||
or_equal: True
|
||||
- dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B:
|
||||
column_A: number_of_applied_services
|
||||
column_B: number_of_applied_paid_services
|
||||
or_equal: True
|
||||
- dbt_expectations.expect_column_pair_values_A_to_be_greater_than_B:
|
||||
column_A: number_of_applied_services
|
||||
column_B: number_of_applied_upgraded_services
|
||||
or_equal: True
|
||||
|
||||
columns:
|
||||
- name: id_booking
|
||||
data_type: bigint
|
||||
description: |
|
||||
The identifier of the booking. Acts as Primary Key to this table.
|
||||
Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
- unique
|
||||
|
||||
- name: id_verification_request
|
||||
data_type: bigint
|
||||
description:
|
||||
The identifier of the verification request. It acts as Foreign Key to
|
||||
Verification Request table. It can be null.
|
||||
|
||||
- name: id_deal
|
||||
data_type: string
|
||||
description: |
|
||||
Unique identifier of the account. It can be null.
|
||||
|
||||
- name: id_user_host
|
||||
data_type: string
|
||||
description: |
|
||||
Unique identifier of the user that acts as a Host. Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: id_user_guest
|
||||
data_type: string
|
||||
description: |
|
||||
Unique identifier of the user that acts as a Guest.
|
||||
Can be null if Superhog does not interact with the Guest.
|
||||
|
||||
- name: booking_status
|
||||
data_type: string
|
||||
description: |
|
||||
The current status of the booking. Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_created_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
Timestamp of when the Booking record was created in the Backend.
|
||||
Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_updated_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
Timestamp of when the Booking record was last updated in the Backend.
|
||||
Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_check_in_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
Timestamp of the Check-in of the Booking.
|
||||
Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: booking_check_out_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
Timestamp of the Check-out of the Booking.
|
||||
Cannot be null.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: host_currency_code
|
||||
data_type: string
|
||||
description: |
|
||||
Iso 4217 currency code for the account of the Host.
|
||||
It can be null.
|
||||
|
||||
- name: is_user_in_new_dash
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to determine if this user host is in New Dash or not.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: new_dash_version
|
||||
data_type: string
|
||||
description: |
|
||||
For users that are in New Dash, specifies the New Dash Version
|
||||
in which these users were moved or joined. It can be null if
|
||||
the user is not in new dash.
|
||||
|
||||
- name: user_in_new_dash_since_timestamp_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
For users that are in New Dash, the effective date since
|
||||
these users can be considered in New Dash. If the user
|
||||
has moved from Old Dash, it will be the new_dash_move_at_utc.
|
||||
If not, it will correspond to the joined_at_utc. It can be null
|
||||
if the user is not in new dash.
|
||||
|
||||
- name: booking_total_price_in_gbp
|
||||
data_type: decimal
|
||||
description: |
|
||||
Identifies the current total price of the booking by adding up the
|
||||
prices of each service applied to this booking, converted in GBP.
|
||||
Can be null. Can vary over time depending on the service status,
|
||||
payments, etc, as well as it can vary over time until the charge
|
||||
date due to the currency rate estimation in the future.
|
||||
|
||||
- name: first_service_charge_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
Identifies the first moment in time in which the first
|
||||
service applied to this booking is charged.
|
||||
|
||||
- name: last_service_charge_date_utc
|
||||
data_type: date
|
||||
description: |
|
||||
Identifies the last moment in time in which the last
|
||||
service applied to this booking is charged.
|
||||
|
||||
- name: first_service_detail_created_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
Timestamp corresponding to the first creation of a Service
|
||||
record applied to this Booking, according to the Backend.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: last_service_detail_created_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
Timestamp corresponding to the latest creation of a Service
|
||||
record applied to this Booking, according to the Backend.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: last_service_detail_updated_at_utc
|
||||
data_type: timestamp
|
||||
description: |
|
||||
Timestamp corresponding to the latest update on any Service
|
||||
record applied to this Booking, according to the Backend.
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
- name: number_of_applied_services
|
||||
data_type: integer
|
||||
description: |
|
||||
Total number of Services applied to this Booking.
|
||||
|
||||
- name: number_of_applied_paid_services
|
||||
data_type: integer
|
||||
description: |
|
||||
Total number of Services that require a monetary
|
||||
income to Superhog applied to this Booking.
|
||||
|
||||
- name: number_of_applied_upgraded_services
|
||||
data_type: integer
|
||||
description: |
|
||||
Total number of Services different from Basic Screening
|
||||
applied to this Booking.
|
||||
|
||||
- name: is_missing_currency_code_in_service_detail
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the currency code is missing in any
|
||||
Booking Service Detail record for this Booking.
|
||||
|
||||
- name: is_booking_cancelled
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the booking has been cancelled or not.
|
||||
|
||||
- name: has_paid_services
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the booking has any paid service or not.
|
||||
|
||||
- name: has_upgraded_services
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the booking has any service different from
|
||||
Basic Screening or not.
|
||||
|
||||
- name: has_screening_service_business_type
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the booking contains any Screening service
|
||||
or not.
|
||||
|
||||
- name: has_deposit_management_service_business_type
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the booking contains any Deposit
|
||||
Management service or not.
|
||||
|
||||
- name: has_protection_service_business_type
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the booking contains any Protection
|
||||
service or not.
|
||||
|
||||
- name: is_missing_id_deal
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the Host for this booking is missing
|
||||
the Id Deal or not.
|
||||
|
||||
- name: is_missing_host_currency_code
|
||||
data_type: boolean
|
||||
description: |
|
||||
Flag to identify if the Host for this booking is missing
|
||||
the currency code or not.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue