ervu-dashboard-etl/mappings/info_recruits/property.hpl
2025-04-07 20:31:30 +03:00

654 lines
17 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
<info>
<name>property</name>
<name_sync_with_filename>Y</name_sync_with_filename>
<description/>
<extended_description/>
<pipeline_version/>
<pipeline_type>Normal</pipeline_type>
<parameters>
</parameters>
<capture_transform_performance>N</capture_transform_performance>
<transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
<transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
<created_user>-</created_user>
<created_date>2024/08/15 14:02:51.713</created_date>
<modified_user>-</modified_user>
<modified_date>2024/08/15 14:02:51.713</modified_date>
</info>
<notepads>
</notepads>
<order>
<hop>
<from>Table input realty</from>
<to>Table output</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input ground_transportation</from>
<to>Table output 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input water_vehicles</from>
<to>Table output 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input air_vehicles</from>
<to>Table output 2 2 2</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input realty</from>
<to>Insert / update</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input air_vehicles</from>
<to>Insert / update 2</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input ground_transportation</from>
<to>Insert / update 4</to>
<enabled>Y</enabled>
</hop>
<hop>
<from>Table input water_vehicles</from>
<to>Insert / update 3</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<key>
<condition>=</condition>
<field>type_property</field>
<name>type_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>property</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>address</name>
<rename>address</rename>
<update>Y</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>kind_right</name>
<rename>kind_right</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>type_property</name>
<rename>type_property</rename>
<update>N</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 2</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<key>
<condition>=</condition>
<field>type_property</field>
<name>type_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>property</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>type_property</name>
<rename>type_property</rename>
<update>N</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>vehicle_category</name>
<rename>vehicle_category</rename>
<update>Y</update>
</value>
<value>
<name>vehicle_type</name>
<rename>vehicle_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>720</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 3</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<key>
<condition>=</condition>
<field>type_property</field>
<name>type_property</name>
</key>
<schema>ervu_dashboard</schema>
<table>property</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>type_property</name>
<rename>type_property</rename>
<update>N</update>
</value>
<value>
<name>vehicle_category</name>
<rename>vehicle_category</rename>
<update>Y</update>
</value>
<value>
<name>vehicle_type</name>
<rename>vehicle_type</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update 4</name>
<type>InsertUpdate</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>100</commit>
<connection>ervu-dashboard</connection>
<lookup>
<key>
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
</key>
<key>
<condition>=</condition>
<field>type_property</field>
<name>type_property</name>
</key>
<key>
<condition>=</condition>
<field>start_date</field>
<name>start_date</name>
</key>
<schema>ervu_dashboard</schema>
<table>property</table>
<value>
<name>recruit_id</name>
<rename>recruit_id</rename>
<update>N</update>
</value>
<value>
<name>type_property</name>
<rename>type_property</rename>
<update>N</update>
</value>
<value>
<name>brand_model</name>
<rename>brand_model</rename>
<update>Y</update>
</value>
<value>
<name>close_date</name>
<rename>close_date</rename>
<update>Y</update>
</value>
<value>
<name>issue_year</name>
<rename>issue_year</rename>
<update>Y</update>
</value>
<value>
<name>reg_plate</name>
<rename>reg_plate</rename>
<update>Y</update>
</value>
<value>
<name>start_date</name>
<rename>start_date</rename>
<update>N</update>
</value>
<value>
<name>vehicle_type</name>
<rename>vehicle_type</rename>
<update>Y</update>
</value>
<value>
<name>vin</name>
<rename>vin</rename>
<update>Y</update>
</value>
</lookup>
<update_bypassed>N</update_bypassed>
<attributes/>
<GUI>
<xloc>1200</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input air_vehicles</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedFL'->'svedVozTS'->'vozTS') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id
where jsonb_typeof(ri.info->'svedFL'->'svedVozTS'->'vozTS') = 'array'
AND r.system_update_date >= '${UP_D}'
)
select
r.id recruit_id,
u->>'naimVid' vehicle_type,
u->>'naznKat' vehicle_category,
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'air_vehicles' type_property
from public.recruits r
join prop on r.id = prop.recruit_id
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>464</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Table input ground_transportation</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedFL'->'svedNazTS'->'nazTS') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id
where jsonb_typeof(ri.info->'svedFL'->'svedNazTS'->'nazTS') = 'array'
AND r.system_update_date >= '${UP_D}'
)
select
r.id recruit_id,
u->>'vidTS' vehicle_type,
u->>'godVyp' issue_year,
u->>'markaTS' brand_model,
u->>'gosRegZn' reg_plate,
u->>'idenNom' vin,
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'ground_transportation' type_property
from public.recruits r
join prop on r.id = prop.recruit_id
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>928</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input realty</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedFL'->'svedON'->'on') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id
where jsonb_typeof(ri.info->'svedFL'->'svedON'->'on') = 'array'
AND r.system_update_date >= '${UP_D}'
)
select
r.id recruit_id,
u->>'naimVidPrav' kind_right,
u->'adrObSob'->>'adrObSobTekst' address,
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'realty' type_property
from public.recruits r
join prop on r.id = prop.recruit_id
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>480</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform>
<name>Table input water_vehicles</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<connection>ervu_person_registry</connection>
<execute_each_row>N</execute_each_row>
<limit>0</limit>
<sql>with prop as
(select jsonb_array_elements(ri.info->'svedFL'->'svedVodTS'->'vodTS') u,
ri.recruit_id
from public.recruits_info ri
join public.recruits r ON r.id = ri.recruit_id
where jsonb_typeof(ri.info->'svedFL'->'svedVodTS'->'vodTS') = 'array'
AND r.system_update_date >= '${UP_D}'
)
select
r.id recruit_id,
u->>'naimVid' vehicle_type,
u->>'naznKat' vehicle_category,
to_date(u->>'dataRegPrav', 'YYYY-MM-DD') start_date,
to_date(u->>'dataPrekPrav', 'YYYY-MM-DD') close_date,
'water_vehicles' type_property
from public.recruits r
join prop on r.id = prop.recruit_id
</sql>
<variables_active>Y</variables_active>
<attributes/>
<GUI>
<xloc>928</xloc>
<yloc>432</yloc>
</GUI>
</transform>
<transform>
<name>Table output</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>property</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>80</yloc>
</GUI>
</transform>
<transform>
<name>Table output 2</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>property</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1136</xloc>
<yloc>96</yloc>
</GUI>
</transform>
<transform>
<name>Table output 2 2</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>property</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>1152</xloc>
<yloc>576</yloc>
</GUI>
</transform>
<transform>
<name>Table output 2 2 2</name>
<type>TableOutput</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<commit>1000</commit>
<connection>ervu-dashboard</connection>
<fields>
</fields>
<ignore_errors>N</ignore_errors>
<only_when_have_rows>N</only_when_have_rows>
<partitioning_daily>N</partitioning_daily>
<partitioning_enabled>N</partitioning_enabled>
<partitioning_monthly>Y</partitioning_monthly>
<return_keys>N</return_keys>
<schema>ervu_dashboard</schema>
<specify_fields>N</specify_fields>
<table>property</table>
<tablename_in_field>N</tablename_in_field>
<tablename_in_table>Y</tablename_in_table>
<truncate>N</truncate>
<use_batch>Y</use_batch>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>576</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>
</pipeline>