Created address_validation in staging
This commit is contained in:
parent
63d7ebb6d1
commit
4a6fdd5ac7
2 changed files with 88 additions and 1 deletions
25
models/intermediate/core/int_core__address_validation.sql
Normal file
25
models/intermediate/core/int_core__address_validation.sql
Normal 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,
|
||||||
|
coalesce(av.validation_passed, false) 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
|
||||||
|
|
@ -1855,4 +1855,66 @@ models:
|
||||||
data_type: date
|
data_type: date
|
||||||
description: |
|
description: |
|
||||||
Date of the last time the information of the Host was updated
|
Date of the last time the information of the Host was updated
|
||||||
in our systems.
|
in our systems.
|
||||||
|
|
||||||
|
- name: int_core__address_validation
|
||||||
|
description:
|
||||||
|
"This table shows whether a request for Check-in cover was approved or not.
|
||||||
|
For each verification there is a unique address_validation."
|
||||||
|
columns:
|
||||||
|
- name: id_address_validation
|
||||||
|
data_type: bigint
|
||||||
|
description: "Unique value for the address validation"
|
||||||
|
tests:
|
||||||
|
- unique
|
||||||
|
- not_null
|
||||||
|
|
||||||
|
- name: id_verification
|
||||||
|
data_type: bigint
|
||||||
|
description: "Unique value for the verification"
|
||||||
|
tests:
|
||||||
|
- unique
|
||||||
|
- not_null
|
||||||
|
|
||||||
|
- name: id_verification_request
|
||||||
|
data_type: bigint
|
||||||
|
description: "Id value for the verification request"
|
||||||
|
|
||||||
|
- name: id_accommodation
|
||||||
|
data_type: bigint
|
||||||
|
description: "Id of the accommodation or listing"
|
||||||
|
|
||||||
|
- name: validation_passed
|
||||||
|
data_type: boolean
|
||||||
|
description: "Boolean to identify if the validation passed or not"
|
||||||
|
tests:
|
||||||
|
- accepted_values:
|
||||||
|
values:
|
||||||
|
- True
|
||||||
|
- False
|
||||||
|
|
||||||
|
- 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 the validation failed"
|
||||||
|
|
||||||
|
- name: created_at_utc
|
||||||
|
data_type: timestamp without time zone
|
||||||
|
description: "Date and time of creation of the address validation"
|
||||||
|
tests:
|
||||||
|
- not_null
|
||||||
|
|
||||||
|
- name: updated_at_utc
|
||||||
|
data_type: timestamp without time zone
|
||||||
|
description: "Date of creation of the address validation"
|
||||||
|
|
||||||
|
- name: dwh_extracted_at_utc
|
||||||
|
data_type: timestamp with time zone
|
||||||
|
description: "Date and time at which data was extracted to dwh"
|
||||||
Loading…
Add table
Add a link
Reference in a new issue