data-dwh-dbt-project/models/intermediate/resolutions/schema.yml
2025-02-25 15:25:37 +01:00

363 lines
10 KiB
YAML

version: 2
models:
- name: int_resolutions__incidents
description: |
"Contains all incidents stored by the resolutions team in Cosmos DB.
This includes data about the incident, the user claiming the incident, the booking,
the accommodation, the host and the guest."
columns:
- name: id_incident
data_type: text
description: "Unique identifier for the incident."
data_tests:
- 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."
- name: current_status_name
data_type: text
description: "current status of the incident."
data_tests:
- not_null
- name: is_submission_complete
data_type: boolean
description: "Flag to indicate if the submission is complete."
data_tests:
- not_null
- name: current_agent_name
data_type: text
description: "Name of the agent who is currently handling the incident."
- name: read_only_for_customers
data_type: boolean
description: "Flag to indicate if the incident is read only for customers."
- name: status_history_logs
data_type: text
description: "Log of the status history."
- name: document_version
data_type: text
description: "Reported document resCentre, Api, manual form"
- name: task_execution_logs
data_type: text
description: ""
- name: created_at_date
data_type: timestamp without time zone
description: "Timestamp when the incident was created."
data_tests:
- not_null
- name: created_date_date
data_type: date
description: "Date when the incident was created."
data_tests:
- not_null
- name: updated_at_date
data_type: timestamp without time zone
description: "Timestamp when the incident was last updated."
data_tests:
- not_null
- name: updated_date_date
data_type: date
description: "Date when the incident was last updated."
data_tests:
- not_null
- name: id_user_host
data_type: text
description: "Unique Id that identifies the host.
Can be from SH or can be external from the client."
data_tests:
- not_null
- name: host_user_claim_logs
data_type: text
description: ""
- name: host_account_name
data_type: text
description: "Name of the host account."
data_tests:
- not_null
- name: host_email
data_type: text
description: "Email of the host."
data_tests:
- not_null
- name: host_last_name
data_type: text
description: "Last name of the host."
data_tests:
- not_null
- name: host_first_name
data_type: text
description: "First name of the host."
data_tests:
- not_null
- name: host_phone_code
data_type: text
description: "Phone code of the host."
- name: host_phone_number
data_type: text
description: "Phone number of the host."
- name: host_phone_number_with_code
data_type: text
description: "Phone number of the host with the code."
- name: id_user_guest
data_type: text
description: "Superhog code that uniquely identifies a single guest."
data_tests:
- not_null
- name: guest_email
data_type: text
description: "Email of the guest."
data_tests:
- not_null
- name: guest_last_name
data_type: text
description: "Last name of the guest."
data_tests:
- not_null
- name: guest_first_name
data_type: text
description: "First name of the guest."
data_tests:
- not_null
- name: guest_phone_code
data_type: text
description: "Phone code of the guest."
- name: guest_phone_number
data_type: text
description: "Phone number of the guest."
- name: guest_phone_number_with_code
data_type: text
description: "Phone number of the guest with the code."
- name: is_guest_deposit_retained
data_type: boolean
description: "In case a deposit has been collected from the guest,
whether it has been retained or not."
- name: is_guest_deposit_collected
data_type: boolean
description: "If the host has collected a deposit from the guest."
- name: deposit_retained_amount_in_txn_currency
data_type: text
description: "Amount of the deposit retained in local currency."
- name: deposit_retained_currency
data_type: text
description: "Currency of the deposit retained."
- name: has_guest_contributed_to_cost
data_type: boolean
description: "If the guest has agreed to contribute to the cost when
talking to the host"
- name: has_host_taken_preventative_steps
data_type: boolean
description: "If the host has taken any action to prevent the damage
or further damage once identified"
- name: guest_contribution_amount_in_txn_currency
data_type: text
description: "Amount of the guest contribution, in case they did,
in local currency."
- name: guest_contribution_currency
data_type: text
description: "Currency of the guest contribution."
- name: guest_contacted_about_damage
data_type: boolean
description: "If the host has contacted the guest about the damage caused"
- name: guest_contacted_evidence_files
data_type: text
description: ""
- name: guest_preventative_steps_details
data_type: text
description: "Description of any action to prevent the damage or further
damage once identified"
- name: id_accommodation
data_type: text
description: "Superhog code that uniquely identifies a single accommodation."
data_tests:
- not_null
- name: accommodation_url
data_type: text
description: "Accommodation URL from any distribution channel,
preferable direct website."
- name: accommodation_name
data_type: text
description: "Accommodation name."
- name: accommodation_address
data_type: text
description: "Address of the accommodation."
- name: are_pets_allowed
data_type: boolean
description: "Flag to indicate if pets are allowed in the accommodation."
- name: comment_logs
data_type: text
description: ""
- name: has_underlying_insurance
data_type: boolean
description: "If the property has underlying insurance"
- name: insurance_claim_submitted
data_type: boolean
description: "If an insurance claim has been submitted to an insurance company"
- name: insurance_evidence_files
data_type: text
description: ""
- name: check_in_at_utc
data_type: timestamp without time zone
description: "Timestamp of the check-in date in UTC of the booking."
data_tests:
- not_null
- name: check_in_date_utc
data_type: date
description: "Date of the check-in date in UTC of the booking."
data_tests:
- not_null
- name: check_out_at_utc
data_type: timestamp without time zone
description: "Timestamp of the check-out date in UTC of the booking."
data_tests:
- not_null
- name: check_out_date_utc
data_type: date
description: "Date of the check-out date in UTC of the booking."
data_tests:
- not_null
- name: id_booking
data_type: text
description: "Superhog unique booking ID"
data_tests:
- not_null
- name: booking_status
data_type: text
description: "Status of the booking."
- name: id_reservation
data_type: text
description: "External unique ID"
- name: booking_details
data_type: text
description: ""
- name: number_of_guests
data_type: text
description: "Number of guests in the booking."
- name: booking_services
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"
- name: booking_platform_reference
data_type: text
description: ""
- name: agent_history
data_type: text
description: ""
- name: before_damage_evidence
data_type: text
description: ""
- name: original_invoice_evidence
data_type: text
description: ""
- name: damage_incident_details
data_type: text
description: "Description of what happened in general terms"
- name: has_confirmed_loss
data_type: boolean
description: "Confirmation that the information they have provided in
the report is true to the best of their knowledge."
- name: damage_report_items
data_type: text
description: "List of items that were damaged."
- name: third_party_claim_submitted
data_type: boolean
description: "If the host is seeking compensation from another platform"
- name: third_party_claim_from
data_type: text
description: "For example, Aircover from Airbnb."
- name: third_party_claim_amount_in_txn_currency
data_type: text
description: "Claim amount in local currency if the host is seeking
compensation from another platform."
- name: third_party_claim_currency
data_type: text
description: "Currency of the claim amount if the host is seeking
compensation from another platform."
- name: cosmos_db_timestamp_utc
data_type: timestamp
description: Internal Cosmos DB timestamp of the last record update.
data_tests:
- not_null