Merged PR 2578: Created address_validations in intermediate

# Description

Created address_validations in intermediate for check in hero

# 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: #17069
This commit is contained in:
Joaquin Ossa 2024-08-20 09:46:27 +00:00
commit 8171fda345
2 changed files with 87 additions and 1 deletions

View file

@ -0,0 +1,25 @@
with
stg_core__address_validation as (
select * from {{ ref("stg_core__address_validation") }}
),
stg_core__verification_to_address_validation as (
select * from {{ ref("stg_core__verification_to_address_validation") }}
),
stg_core__verification as (select * from {{ ref("stg_core__verification") }})
select
av.id_address_validation as id_address_validation,
vtav.id_verification as id_verification,
v.id_verification_request as id_verification_request,
av.id_accommodation as id_accommodation,
av.validation_passed as validation_passed,
av.feature_size_meters as feature_size_meters,
av.feature_size_meters_upper_limit as feature_size_meters_upper_limit,
av.notes as notes,
av.created_at_utc as created_at_utc,
av.updated_at_utc as updated_at_utc,
av.dwh_extracted_at_utc as dwh_extracted_at_utc
from stg_core__address_validation av
left join
stg_core__verification_to_address_validation vtav
on av.id_address_validation = vtav.id_address_validation
left join stg_core__verification v on v.id_verification = vtav.id_verification

View file

@ -1897,4 +1897,65 @@ models:
data_type: date
description: |
Date of the last time the information of the Host was updated
in our systems.
in our systems.
- name: int_core__address_validations
description:
"This tables contains records on address validation for Check-in Hero
purchases by guests.
The cover validation can pass or be rejected"
columns:
- name: id_address_validation
data_type: bigint
description: "Id of the address validation."
tests:
- unique
- not_null
- name: id_verification
data_type: bigint
description: "Id of the verification."
tests:
- unique
- not_null
- name: id_verification_request
data_type: bigint
description: "Id of the verification request."
tests:
- unique
- not_null
- name: id_accommodation
data_type: bigint
description: "Id of the accommodation or listing."
tests:
- not_null
- name: validation_passed
data_type: boolean
description: "Boolean to indicate if the validation was approved or not."
- name: feature_size_meters
data_type: numeric
description: ""
- name: feature_size_meters_upper_limit
data_type: numeric
description: ""
- name: notes
data_type: character varying
description: "Notes in case there was some problem with the validation."
- name: created_at_utc
data_type: timestamp without time zone
description: "Date and time at which the validation was created."
- name: updated_at_utc
data_type: timestamp without time zone
description: "Date and time at which the validation was last updated."
- name: dwh_extracted_at_utc
data_type: timestamp with time zone
description: "Date and time at which the record was extracted from the backend into the DWH."