Addressed comments

This commit is contained in:
Joaquin Ossa 2025-02-24 16:27:16 +01:00
parent 34f8fbe499
commit 1d514cec3a
2 changed files with 2 additions and 28 deletions

View file

@ -14,12 +14,6 @@ models:
- unique
- not_null
- name: id_user
data_type: text
description: "Id of the user who created the incident."
data_tests:
- not_null
- name: id_verification
data_type: text
description: "Superhog unique validation ID, coming from other APIs."
@ -86,10 +80,6 @@ models:
to: ref('stg_core__user')
field: id_user
- name: host_user_claim_logs
data_type: text
description: ""
- name: host_account_name
data_type: text
description: "Name of the host account."
@ -316,10 +306,6 @@ models:
data_type: text
description: "List of services included in the booking."
- name: booking_protection
data_type: text
description: ""
- name: booking_platform_used
data_type: text
description: "The booking platform used"

View file

@ -12,7 +12,6 @@ with
select
-- Basic Incident Details
{{ adapter.quote("documents") }} ->> 'id' as id_incident,
{{ adapter.quote("documents") }} ->> 'partitionKey' as id_user,
{{ adapter.quote("documents") }} ->> 'VerificationId' as id_verification,
{{ adapter.quote("documents") }} ->> 'CurrentStatusName' as current_status_name,
({{ adapter.quote("documents") }} ->> 'IsSubmissionComplete')::boolean
@ -30,7 +29,6 @@ select
-- Host Details
{{ adapter.quote("documents") }} -> 'Host' ->> 'Id' as id_user_host,
{{ adapter.quote("documents") }} -> 'Host' ->> 'UserClaims' as host_user_claim_logs,
{{ adapter.quote("documents") }} -> 'Host' ->> 'AccountName' as host_account_name,
-- Host Contact Details
@ -128,11 +126,7 @@ select
-> 'Guest'
-> 'Involvements'
->> 'ContactedAboutDamage'
)::boolean as guest_contacted_about_damage,
{{ adapter.quote("documents") }}
-> 'Guest'
-> 'Involvements'
->> 'ContactedEvidenceFiles' as guest_contacted_evidence_files,
)::boolean as is_guest_contacted_about_damage,
{{ adapter.quote("documents") }}
-> 'Guest'
-> 'Involvements'
@ -156,10 +150,7 @@ select
({{ adapter.quote("documents") }} -> 'Insurance' ->> 'UnderlyingInsurance')::boolean
as has_underlying_insurance,
({{ adapter.quote("documents") }} -> 'Insurance' ->> 'ClaimSubmitted')::boolean
as insurance_claim_submitted,
{{ adapter.quote("documents") }}
-> 'Insurance'
->> 'UnderlyingInsuranceEvidenceFiles' as insurance_evidence_files,
as is_insurance_claim_submitted,
-- Booking Details
({{ adapter.quote("documents") }} -> 'Reservation' ->> 'CheckIn')::timestamp
@ -189,9 +180,6 @@ select
->> 'BookingServices' as booking_services,
{{ adapter.quote("documents") }}
-> 'Reservation'
->> 'BookingProtection' as booking_protection,
{{ adapter.quote("documents") }}
-> 'Reservation'
->> 'BookingPlatformUsed' as booking_platform_used,
{{ adapter.quote("documents") }}
-> 'Reservation'