Added more description and tests to schema

This commit is contained in:
Joaquin Ossa 2024-09-02 12:44:05 +02:00
parent ee4d213274
commit 129b00e29b
2 changed files with 55 additions and 2 deletions

View file

@ -195,8 +195,61 @@ models:
- unique
- not_null
- name: stg_core__edeposit_user
description:
"This table contains data on partner users for E-deposit,
their currencies and amount of protection according to the
level given on the verification"
columns:
- name: id
data_type: bigint
description: "Record id for this table"
tests:
- unique
- not_null
- not_null
- name: id_user_partner
data_type: character varying
description: "Unique id for partner user"
tests:
- unique
- not_null
- name: currency
data_type: character varying
description:
"Three-letter ISO code assigned to the currency used by user.
Note that some of them are upper cased and others not."
tests:
- not_null
- name: nightly_fee
data_type: numeric
description: "Fee charged per night on booking"
tests:
- not_null
- name: cancellation_fee
data_type: numeric
description: "Fee charged per cancelled booking"
tests:
- not_null
- name: protection_lower_level
data_type: numeric
description: "Amount of protection given when verification is 'Passed'"
- name: protection_upper_level
data_type: numeric
description: "Amount of protection given when verification is 'Flagged'"
- name: created_at_utc
data_type: timestamp without time zone
description: "Timestamp of when user was created"
- name: updated_at_utc
data_type: timestamp without time zone
description: "Timestamp of when user was last updated"
- name: dwh_extracted_at_utc
data_type: timestamp with time zone
description: "Timestamp of when data was extracted to DWH"

View file

@ -5,7 +5,7 @@ with
stg_core__edeposit_user as (
select
{{ adapter.quote("Id") }} as id,
{{ adapter.quote("UserId") }} as id_user,
{{ adapter.quote("UserId") }} as id_user_partner,
{{ adapter.quote("Currency") }} as currency,
{{ adapter.quote("NightlyFee") }} as nightly_fee,
{{ adapter.quote("CancellationFee") }} as cancellation_fee,