ERVU-505: fixes

This commit is contained in:
adel.ka 2025-07-28 13:32:12 +03:00
parent d3442b1f85
commit fa1b7899c7
12 changed files with 1083 additions and 51 deletions

View file

@ -23,6 +23,11 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
@ -124,7 +129,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -188,6 +193,93 @@ JOIN child ON r.recruit_id = child.recruit_id;
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>child_external_id</name>
</argument>
<argument>
<name>child_id_ern</name>
</argument>
<argument>
<name>kinship_type</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>death_date</name>
</argument>
<argument>
<name>death_az_number</name>
</argument>
<argument>
<name>birth_az_number</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_child (
recruit_id,
child_external_id,
child_id_ern,
kinship_type,
last_name,
first_name,
middle_name,
full_name,
birth_date,
death_date,
death_az_number,
birth_az_number
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, child_external_id)
DO UPDATE SET
child_id_ern = EXCLUDED.child_id_ern,
kinship_type = EXCLUDED.kinship_type,
last_name = EXCLUDED.last_name,
first_name = EXCLUDED.first_name,
middle_name = EXCLUDED.middle_name,
full_name = EXCLUDED.full_name,
birth_date = EXCLUDED.birth_date,
death_date = EXCLUDED.death_date,
death_az_number = EXCLUDED.death_az_number,
birth_az_number = EXCLUDED.birth_az_number;</sql>
<attributes/>
<GUI>
<xloc>768</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -34,6 +34,11 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
@ -82,13 +87,11 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>child_external_id</field>
<name>child_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
@ -264,6 +267,97 @@ JOIN child ON r.recruit_id = child.recruit_id;
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>child_external_id</name>
</argument>
<argument>
<name>child_id_ern</name>
</argument>
<argument>
<name>kinship_type</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>death_date</name>
</argument>
<argument>
<name>death_az_number</name>
</argument>
<argument>
<name>birth_az_number</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_child (
recruit_id,
child_external_id,
child_id_ern,
kinship_type,
last_name,
first_name,
middle_name,
full_name,
birth_date,
death_date,
death_az_number,
birth_az_number
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, child_external_id)
DO UPDATE SET
child_id_ern = EXCLUDED.child_id_ern,
kinship_type = EXCLUDED.kinship_type,
last_name = EXCLUDED.last_name,
first_name = EXCLUDED.first_name,
middle_name = EXCLUDED.middle_name,
full_name = EXCLUDED.full_name,
birth_date = EXCLUDED.birth_date,
death_date = EXCLUDED.death_date,
death_az_number = EXCLUDED.death_az_number,
birth_az_number = EXCLUDED.birth_az_number;</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>592</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform_error_handling>
<error>
<source_transform>Select values 4 2</source_transform>

View file

@ -23,6 +23,11 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
@ -44,13 +49,11 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>child_external_id</field>
<name>child_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
@ -126,7 +129,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -189,6 +192,93 @@ JOIN child ON r.recruit_id = child.recruit_id;
<yloc>288</yloc>
</GUI>
</transform>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>child_external_id</name>
</argument>
<argument>
<name>child_id_ern</name>
</argument>
<argument>
<name>kinship_type</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>death_date</name>
</argument>
<argument>
<name>death_az_number</name>
</argument>
<argument>
<name>birth_az_number</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_child (
recruit_id,
child_external_id,
child_id_ern,
kinship_type,
last_name,
first_name,
middle_name,
full_name,
birth_date,
death_date,
death_az_number,
birth_az_number
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, child_external_id)
DO UPDATE SET
child_id_ern = EXCLUDED.child_id_ern,
kinship_type = EXCLUDED.kinship_type,
last_name = EXCLUDED.last_name,
first_name = EXCLUDED.first_name,
middle_name = EXCLUDED.middle_name,
full_name = EXCLUDED.full_name,
birth_date = EXCLUDED.birth_date,
death_date = EXCLUDED.death_date,
death_az_number = EXCLUDED.death_az_number,
birth_az_number = EXCLUDED.birth_az_number;</sql>
<attributes/>
<GUI>
<xloc>704</xloc>
<yloc>128</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -23,6 +23,11 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
@ -44,13 +49,11 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>child_external_id</field>
<name>child_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
@ -126,7 +129,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -189,6 +192,93 @@ JOIN child ON r.recruit_id = child.recruit_id;
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>child_external_id</name>
</argument>
<argument>
<name>child_id_ern</name>
</argument>
<argument>
<name>kinship_type</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>death_date</name>
</argument>
<argument>
<name>death_az_number</name>
</argument>
<argument>
<name>birth_az_number</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_child (
recruit_id,
child_external_id,
child_id_ern,
kinship_type,
last_name,
first_name,
middle_name,
full_name,
birth_date,
death_date,
death_az_number,
birth_az_number
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, child_external_id)
DO UPDATE SET
child_id_ern = EXCLUDED.child_id_ern,
kinship_type = EXCLUDED.kinship_type,
last_name = EXCLUDED.last_name,
first_name = EXCLUDED.first_name,
middle_name = EXCLUDED.middle_name,
full_name = EXCLUDED.full_name,
birth_date = EXCLUDED.birth_date,
death_date = EXCLUDED.death_date,
death_az_number = EXCLUDED.death_az_number,
birth_az_number = EXCLUDED.birth_az_number;</sql>
<attributes/>
<GUI>
<xloc>800</xloc>
<yloc>208</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -23,6 +23,11 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
@ -44,13 +49,11 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>child_external_id</field>
<name>child_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
@ -126,7 +129,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -189,6 +192,93 @@ JOIN child ON r.recruit_id = child.recruit_id;
<yloc>320</yloc>
</GUI>
</transform>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>child_external_id</name>
</argument>
<argument>
<name>child_id_ern</name>
</argument>
<argument>
<name>kinship_type</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>death_date</name>
</argument>
<argument>
<name>death_az_number</name>
</argument>
<argument>
<name>birth_az_number</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_child (
recruit_id,
child_external_id,
child_id_ern,
kinship_type,
last_name,
first_name,
middle_name,
full_name,
birth_date,
death_date,
death_az_number,
birth_az_number
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, child_external_id)
DO UPDATE SET
child_id_ern = EXCLUDED.child_id_ern,
kinship_type = EXCLUDED.kinship_type,
last_name = EXCLUDED.last_name,
first_name = EXCLUDED.first_name,
middle_name = EXCLUDED.middle_name,
full_name = EXCLUDED.full_name,
birth_date = EXCLUDED.birth_date,
death_date = EXCLUDED.death_date,
death_az_number = EXCLUDED.death_az_number,
birth_az_number = EXCLUDED.birth_az_number;</sql>
<attributes/>
<GUI>
<xloc>624</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -23,6 +23,11 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
@ -44,13 +49,11 @@
<condition>=</condition>
<field>recruit_id</field>
<name>recruit_id</name>
<name2/>
</key>
<key>
<condition>=</condition>
<field>child_external_id</field>
<name>child_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
<table>citizen_child</table>
@ -126,7 +129,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -189,6 +192,93 @@ JOIN child ON r.recruit_id = child.recruit_id;
<yloc>368</yloc>
</GUI>
</transform>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>child_external_id</name>
</argument>
<argument>
<name>child_id_ern</name>
</argument>
<argument>
<name>kinship_type</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>death_date</name>
</argument>
<argument>
<name>death_az_number</name>
</argument>
<argument>
<name>birth_az_number</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<execute_each_row>Y</execute_each_row>
<quoteString>N</quoteString>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_child (
recruit_id,
child_external_id,
child_id_ern,
kinship_type,
last_name,
first_name,
middle_name,
full_name,
birth_date,
death_date,
death_az_number,
birth_az_number
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, child_external_id)
DO UPDATE SET
child_id_ern = EXCLUDED.child_id_ern,
kinship_type = EXCLUDED.kinship_type,
last_name = EXCLUDED.last_name,
first_name = EXCLUDED.first_name,
middle_name = EXCLUDED.middle_name,
full_name = EXCLUDED.full_name,
birth_date = EXCLUDED.birth_date,
death_date = EXCLUDED.death_date,
death_az_number = EXCLUDED.death_az_number,
birth_az_number = EXCLUDED.birth_az_number;</sql>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -23,6 +23,11 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
@ -48,8 +53,8 @@
</key>
<key>
<condition>=</condition>
<field>guardian_external_id</field>
<name>guardian_external_id</name>
<field>guardianship_external_id</field>
<name>guardianship_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
@ -90,8 +95,8 @@
<update>Y</update>
</value>
<value>
<name>guardian_external_id</name>
<rename>guardian_external_id</rename>
<name>guardianship_external_id</name>
<rename>guardianship_external_id</rename>
<update>N</update>
</value>
<value>
@ -111,7 +116,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -135,7 +140,7 @@ ON r.recruit_id = ri.recruit_id --AND '${ID_F1}' != '' -- Проверка на
)
SELECT
r.recruit_id AS recruit_id,
ch->>'id' AS guardian_external_id,
ch->>'id' AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,
@ -160,6 +165,82 @@ FROM ervu_dashboard.citizen r
<yloc>352</yloc>
</GUI>
</transform>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>snils</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>guardianship_external_id</name>
</argument>
<argument>
<name>guardian_id_ern</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_guardianship (
recruit_id,
birth_date,
first_name,
full_name,
snils,
last_name,
middle_name,
guardianship_external_id,
guardian_id_ern
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, guardianship_external_id)
DO UPDATE SET
birth_date = EXCLUDED.birth_date,
first_name = EXCLUDED.first_name,
full_name = EXCLUDED.full_name,
snils = EXCLUDED.snils,
last_name = EXCLUDED.last_name,
middle_name = EXCLUDED.middle_name,
guardian_id_ern = EXCLUDED.guardian_id_ern;</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>752</xloc>
<yloc>224</yloc>
</GUI>
</transform>
<transform_error_handling>
</transform_error_handling>
<attributes/>

View file

@ -34,9 +34,90 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>snils</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>guardianship_external_id</name>
</argument>
<argument>
<name>guardian_id_ern</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_guardianship (
recruit_id,
birth_date,
first_name,
full_name,
snils,
last_name,
middle_name,
guardianship_external_id,
guardian_id_ern
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, guardianship_external_id)
DO UPDATE SET
birth_date = EXCLUDED.birth_date,
first_name = EXCLUDED.first_name,
full_name = EXCLUDED.full_name,
snils = EXCLUDED.snils,
last_name = EXCLUDED.last_name,
middle_name = EXCLUDED.middle_name,
guardian_id_ern = EXCLUDED.guardian_id_ern;</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>672</xloc>
<yloc>112</yloc>
</GUI>
</transform>
<transform>
<name>Get variables</name>
<type>GetVariable</type>
@ -86,8 +167,8 @@
</key>
<key>
<condition>=</condition>
<field>guardian_external_id</field>
<name>guardian_external_id</name>
<field>guardianship_external_id</field>
<name>guardianship_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
@ -128,8 +209,8 @@
<update>Y</update>
</value>
<value>
<name>guardian_external_id</name>
<rename>guardian_external_id</rename>
<name>guardianship_external_id</name>
<rename>guardianship_external_id</rename>
<update>N</update>
</value>
<value>
@ -186,7 +267,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -210,7 +291,7 @@
)
SELECT
r.recruit_id AS recruit_id,
ch->>'id' AS guardian_external_id,
ch->>'id' AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,

View file

@ -23,9 +23,90 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>snils</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>guardianship_external_id</name>
</argument>
<argument>
<name>guardian_id_ern</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_guardianship (
recruit_id,
birth_date,
first_name,
full_name,
snils,
last_name,
middle_name,
guardianship_external_id,
guardian_id_ern
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, guardianship_external_id)
DO UPDATE SET
birth_date = EXCLUDED.birth_date,
first_name = EXCLUDED.first_name,
full_name = EXCLUDED.full_name,
snils = EXCLUDED.snils,
last_name = EXCLUDED.last_name,
middle_name = EXCLUDED.middle_name,
guardian_id_ern = EXCLUDED.guardian_id_ern;</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>144</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
@ -48,8 +129,8 @@
</key>
<key>
<condition>=</condition>
<field>guardian_external_id</field>
<name>guardian_external_id</name>
<field>guardianship_external_id</field>
<name>guardianship_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
@ -90,8 +171,8 @@
<update>Y</update>
</value>
<value>
<name>guardian_external_id</name>
<rename>guardian_external_id</rename>
<name>guardianship_external_id</name>
<rename>guardianship_external_id</rename>
<update>N</update>
</value>
<value>
@ -111,7 +192,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -135,7 +216,7 @@
)
SELECT
r.recruit_id AS recruit_id,
ch->>'id' AS guardian_external_id,
ch->>'id' AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,

View file

@ -23,9 +23,90 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>snils</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>guardianship_external_id</name>
</argument>
<argument>
<name>guardian_id_ern</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_guardianship (
recruit_id,
birth_date,
first_name,
full_name,
snils,
last_name,
middle_name,
guardianship_external_id,
guardian_id_ern
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, guardianship_external_id)
DO UPDATE SET
birth_date = EXCLUDED.birth_date,
first_name = EXCLUDED.first_name,
full_name = EXCLUDED.full_name,
snils = EXCLUDED.snils,
last_name = EXCLUDED.last_name,
middle_name = EXCLUDED.middle_name,
guardian_id_ern = EXCLUDED.guardian_id_ern;</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>784</xloc>
<yloc>192</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
@ -48,8 +129,8 @@
</key>
<key>
<condition>=</condition>
<field>guardian_external_id</field>
<name>guardian_external_id</name>
<field>guardianship_external_id</field>
<name>guardianship_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
@ -90,8 +171,8 @@
<update>Y</update>
</value>
<value>
<name>guardian_external_id</name>
<rename>guardian_external_id</rename>
<name>guardianship_external_id</name>
<rename>guardianship_external_id</rename>
<update>N</update>
</value>
<value>
@ -111,7 +192,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -135,7 +216,7 @@
)
SELECT
r.recruit_id AS recruit_id,
ch->>'id' AS guardian_external_id,
ch->>'id' AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,

View file

@ -23,9 +23,90 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>snils</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>guardianship_external_id</name>
</argument>
<argument>
<name>guardian_id_ern</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_guardianship (
recruit_id,
birth_date,
first_name,
full_name,
snils,
last_name,
middle_name,
guardianship_external_id,
guardian_id_ern
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, guardianship_external_id)
DO UPDATE SET
birth_date = EXCLUDED.birth_date,
first_name = EXCLUDED.first_name,
full_name = EXCLUDED.full_name,
snils = EXCLUDED.snils,
last_name = EXCLUDED.last_name,
middle_name = EXCLUDED.middle_name,
guardian_id_ern = EXCLUDED.guardian_id_ern;</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>640</xloc>
<yloc>176</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
@ -48,8 +129,8 @@
</key>
<key>
<condition>=</condition>
<field>guardian_external_id</field>
<name>guardian_external_id</name>
<field>guardianship_external_id</field>
<name>guardianship_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
@ -90,8 +171,8 @@
<update>Y</update>
</value>
<value>
<name>guardian_external_id</name>
<rename>guardian_external_id</rename>
<name>guardianship_external_id</name>
<rename>guardianship_external_id</rename>
<update>N</update>
</value>
<value>
@ -111,7 +192,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -135,7 +216,7 @@
)
SELECT
r.recruit_id AS recruit_id,
ch->>'id' AS guardian_external_id,
ch->>'id' AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,

View file

@ -23,9 +23,90 @@
<hop>
<from>Table input</from>
<to>Insert / update</to>
<enabled>N</enabled>
</hop>
<hop>
<from>Table input</from>
<to>Execute SQL script</to>
<enabled>Y</enabled>
</hop>
</order>
<transform>
<name>Execute SQL script</name>
<type>ExecSql</type>
<description/>
<distribute>Y</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
<method>none</method>
<schema_name/>
</partitioning>
<arguments>
<argument>
<name>recruit_id</name>
</argument>
<argument>
<name>birth_date</name>
</argument>
<argument>
<name>first_name</name>
</argument>
<argument>
<name>full_name</name>
</argument>
<argument>
<name>snils</name>
</argument>
<argument>
<name>last_name</name>
</argument>
<argument>
<name>middle_name</name>
</argument>
<argument>
<name>guardianship_external_id</name>
</argument>
<argument>
<name>guardian_id_ern</name>
</argument>
</arguments>
<connection>ervu-dashboard</connection>
<delete_field/>
<execute_each_row>Y</execute_each_row>
<insert_field/>
<quoteString>N</quoteString>
<read_field/>
<replace_variables>N</replace_variables>
<set_params>Y</set_params>
<single_statement>N</single_statement>
<sql>INSERT INTO ervu_dashboard.citizen_guardianship (
recruit_id,
birth_date,
first_name,
full_name,
snils,
last_name,
middle_name,
guardianship_external_id,
guardian_id_ern
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT (recruit_id, guardianship_external_id)
DO UPDATE SET
birth_date = EXCLUDED.birth_date,
first_name = EXCLUDED.first_name,
full_name = EXCLUDED.full_name,
snils = EXCLUDED.snils,
last_name = EXCLUDED.last_name,
middle_name = EXCLUDED.middle_name,
guardian_id_ern = EXCLUDED.guardian_id_ern;</sql>
<update_field/>
<attributes/>
<GUI>
<xloc>688</xloc>
<yloc>240</yloc>
</GUI>
</transform>
<transform>
<name>Insert / update</name>
<type>InsertUpdate</type>
@ -48,8 +129,8 @@
</key>
<key>
<condition>=</condition>
<field>guardian_external_id</field>
<name>guardian_external_id</name>
<field>guardianship_external_id</field>
<name>guardianship_external_id</name>
<name2/>
</key>
<schema>ervu_dashboard</schema>
@ -90,8 +171,8 @@
<update>Y</update>
</value>
<value>
<name>guardian_external_id</name>
<rename>guardian_external_id</rename>
<name>guardianship_external_id</name>
<rename>guardianship_external_id</rename>
<update>N</update>
</value>
<value>
@ -111,7 +192,7 @@
<name>Table input</name>
<type>TableInput</type>
<description/>
<distribute>Y</distribute>
<distribute>N</distribute>
<custom_distribution/>
<copies>1</copies>
<partitioning>
@ -135,7 +216,7 @@
)
SELECT
r.recruit_id AS recruit_id,
ch->>'id' AS guardian_external_id,
ch->>'id' AS guardianship_external_id,
NULLIF(ch->>'idERN', '') AS guardian_id_ern,
ch->'fioOpek'->>'familiya' AS last_name,
ch->'fioOpek'->>'imya' AS first_name,