child
Y
Normal
N
1000
100
-
2024/08/15 14:02:51.713
-
2024/08/15 14:02:51.713
Table input
Table output
N
Table input
Insert / update
Y
Insert / update
InsertUpdate
Y
1
none
10000
ervu-dashboard
=
recruit_id
recruit_id
=
full_name
full_name
ervu_dashboard
recruit_id
recruit_id
N
birth_az_number
birth_az_number
Y
birth_date
birth_date
Y
death_az_number
death_az_number
Y
death_date
death_date
Y
full_name
full_name
N
kinship_type
kinship_type
Y
N
624
256
Table input
TableInput
Y
1
none
ervu_person_registry
N
0
with child as
(select jsonb_array_elements(ri.info->'svedFL'->'svedDeti'->'rebenok') ch,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id AND r.system_update_date >= '${UP_D}'
where jsonb_typeof(ri.info->'svedFL'->'svedDeti'->'rebenok') = 'array')
select
r.id::uuid recruit_id,
ch->>'naimRodstvSvyazReb' kinship_type,
concat_ws(' ', ch->'svedFLBS'->'fio'->>'familiya',
ch->'svedFLBS'->'fio'->>'imya',
ch->'svedFLBS'->'fio'->>'otchestvo') full_name,
make_date(NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'god', '')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'mesyacz','')::int,
NULLIF(ch->'svedFLBS'->'dataRozhdDok'->>'den','')::int) birth_date,
make_date(NULLIF(ch->'svedSmert'->'dataSmert'->>'god', '')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'mesyacz','')::int,
NULLIF(ch->'svedSmert'->'dataSmert'->>'den','')::int) death_date,
ch->'svedSmert'->>'nomerZapis' death_az_number,
ch->'svedAZRozhd'->>'nomerZapis' birth_az_number
from public.recruits r
join child on r.id = child.recruit_id
Y
400
256
Table output
TableOutput
Y
1
none
1000
ervu-dashboard
N
N
N
N
Y
N
ervu_dashboard
N
N
Y
N
Y
608
400