Merged PR 2728: edeposit verifications docs and small refactors

# Description

This PR:
- Adds half-decent docs to `stg_edeposit__verifications` and tests. I say half-decent because I would describe our tests as "as strict as the backend guidance allows". But we can't do miracles, so it stays this way for now.
- Shifts a few column operations that were being done in the `int` layer into the `stg` layer.
- Also removes a couple of fields from `int` that were marked as deprecated by Ray. Would rather not have them at all beyond `stg`.

# 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: #20123
This commit is contained in:
Pablo Martín 2024-09-04 11:07:58 +00:00
commit dd57c28768
3 changed files with 280 additions and 15 deletions

View file

@ -7,9 +7,9 @@ select
-- they are completely unrelated
id_verification,
id_booking,
id_user as id_user_partner,
id_listing as id_accommodation,
version, -- V1 for Guesty and V2 for E-deposit
id_user_partner,
id_accommodation,
version,
case
when version = 'V1' then 'Guesty' when version = 'V2' then 'Edeposit' else null
end as verification_source,
@ -40,14 +40,11 @@ select
listing_country,
listing_postcode,
pets_allowed,
level_of_protection_amount,
level_of_protection_currency,
status_updated_at_utc,
cast(status_updated_at_utc as date) as status_updated_date_utc,
status_updated_date_utc,
updated_at_utc,
cast(updated_at_utc as date) as updated_date_utc,
creation_at_utc as athena_creation_at_utc,
cast(creation_at_utc as date) as athena_creation_date_utc,
athena_creation_at_utc,
athena_creation_date_utc,
created_at_utc,
cast(created_at_utc as date) as created_date_utc
created_date_utc
from stg_edeposit__verifications