Added the new field to int_core__bookings and to int_core__verification_requests

This commit is contained in:
Joaquin Ossa 2024-07-11 17:16:51 +02:00
parent 70c2c5f6bf
commit 2bfe3ccf3c
2 changed files with 14 additions and 0 deletions

View file

@ -12,6 +12,9 @@ with
),
int_core__booking_charge_events as (
select * from {{ ref("int_core__booking_charge_events") }}
),
int_core__verification_request_booking_source as (
select * from {{ ref("int_core__verification_request_booking_source") }}
)
select
b.id_booking,
@ -21,6 +24,7 @@ select
b.id_accommodation,
b.id_booking_source,
b.id_verification_request,
vrbs.verification_request_booking_source,
b.id_staging_host_booking,
db.is_duplicate_booking,
db.is_duplicating_booking_with_id,
@ -50,3 +54,6 @@ from stg_core__booking b
left join stg_core__booking_state bs on b.id_booking_state = bs.id_booking_state
left join int_core__duplicate_bookings db on b.id_booking = db.id_booking
left join int_core__booking_charge_events bce on b.id_booking = bce.id_booking
left join
int_core__verification_request_booking_source vrbs
on vrbs.id_verification_request = b.id_verification_request

View file

@ -8,6 +8,9 @@ with
),
int_core__verification_request_completed_date as (
select * from {{ ref("int_core__verification_request_completed_date") }}
),
int_core__verification_request_booking_source as (
select * from {{ ref("int_core__verification_request_booking_source") }}
)
select
vr.id_verification_request,
@ -39,6 +42,7 @@ select
vr.is_deleted,
vr.redirect_name,
vr.id_one_step_link,
vrbs.verification_request_booking_source,
vr.success_message,
vr.summary,
vr.rejection_reason,
@ -58,3 +62,6 @@ left join
left join
int_core__verification_request_completed_date vrcd
on vr.id_verification_request = vrcd.id_verification_request
left join
int_core__verification_request_booking_source vrbs
on vrbs.id_verification_request = vr.id_verification_request