<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
  <info>
    <name>citizen_education_flow_repeat</name>
    <name_sync_with_filename>Y</name_sync_with_filename>
    <description/>
    <extended_description/>
    <pipeline_version/>
    <pipeline_type>Normal</pipeline_type>
    <pipeline_status>0</pipeline_status>
    <parameters>
      <parameter>
        <name>IDM_ID</name>
        <default_value>8b100965-1bdf-408e-bf83-86d017b79e61</default_value>
        <description/>
      </parameter>
    </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>2025/08/28 21:16:35.770</created_date>
    <modified_user>-</modified_user>
    <modified_date>2025/08/28 21:16:35.770</modified_date>
  </info>
  <notepads>
  </notepads>
  <order>
    <hop>
      <from>Change job status on error</from>
      <to>Abort</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Create job execution record</from>
      <to>education_input</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Detect empty stream</from>
      <to>Change job status on success</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Filter_null_parental_leave_dates</from>
      <to>block_until_main_finished</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>block_until_main_finished</from>
      <to>upsert_educational_leave</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>upsert_edu_inst_info</from>
      <to>Change job status on error</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>sort_by_recruit_id</from>
      <to>Update</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>upsert_edu_inst_info</from>
      <to>Filter rows</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>education_input</from>
      <to>sort_by_source_id</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>education_input</from>
      <to>Filter_null_parental_leave_dates</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>education_input</from>
      <to>sort_by_recruit_id</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>upsert_educational_leave</from>
      <to>Change job status on error</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Update</from>
      <to>Change job status on error</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>education_input</from>
      <to>Detect empty stream</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Filter rows</from>
      <to>Unique rows</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Unique rows</from>
      <to>Change job status on success</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>sort_by_source_id</from>
      <to>upsert_edu_inst_info</to>
      <enabled>Y</enabled>
    </hop>
  </order>
  <transform>
    <name>Abort</name>
    <type>Abort</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <abort_option>ABORT</abort_option>
    <always_log_rows>Y</always_log_rows>
    <row_threshold>0</row_threshold>
    <attributes/>
    <GUI>
      <xloc>1936</xloc>
      <yloc>640</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Change job status on error</name>
    <type>ExecSql</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <arguments>
      <argument>
        <name>error_description</name>
      </argument>
    </arguments>
    <connection>ervu-dashboard</connection>
    <execute_each_row>Y</execute_each_row>
    <quoteString>N</quoteString>
    <replace_variables>Y</replace_variables>
    <set_params>Y</set_params>
    <single_statement>N</single_statement>
    <sql>UPDATE etl.job_execution
SET status = 'ERROR',
    error_description = ?,
    execution_end_datetime = current_timestamp
WHERE job_name = '${JOB_NAME}' 
and recruitment_id = '${IDM_ID}';

</sql>
    <attributes/>
    <GUI>
      <xloc>1728</xloc>
      <yloc>640</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Change job status on success</name>
    <type>ExecSql</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <arguments>
</arguments>
    <connection>ervu-dashboard</connection>
    <execute_each_row>Y</execute_each_row>
    <quoteString>N</quoteString>
    <replace_variables>Y</replace_variables>
    <set_params>N</set_params>
    <single_statement>N</single_statement>
    <sql>UPDATE etl.job_execution
SET status = 'SUCCESS',
    execution_end_datetime = current_timestamp
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';

</sql>
    <attributes/>
    <GUI>
      <xloc>1936</xloc>
      <yloc>256</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Create job execution record</name>
    <type>ExecSql</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <arguments>
</arguments>
    <connection>ervu-dashboard</connection>
    <execute_each_row>N</execute_each_row>
    <quoteString>N</quoteString>
    <replace_variables>Y</replace_variables>
    <set_params>N</set_params>
    <single_statement>N</single_statement>
    <sql>INSERT INTO etl.job_execution (job_name, recruitment_id, status, execution_datetime, error_description)
VALUES (
           '${JOB_NAME}',
           '${IDM_ID}',
           'PROCESSING',
           current_timestamp,
           NULL
       )
ON CONFLICT (job_name, recruitment_id)
    DO UPDATE SET
                  status = EXCLUDED.status,
                  execution_datetime = EXCLUDED.execution_datetime,
                  error_description = EXCLUDED.error_description;</sql>
    <attributes/>
    <GUI>
      <xloc>640</xloc>
      <yloc>640</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Detect empty stream</name>
    <type>DetectEmptyStream</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <attributes/>
    <GUI>
      <xloc>864</xloc>
      <yloc>256</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Filter rows</name>
    <type>FilterRows</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <compare>
      <condition>
        <conditions>
</conditions>
        <function>=</function>
        <leftvalue>last_row</leftvalue>
        <negated>N</negated>
        <operator>-</operator>
        <value>
          <isnull>N</isnull>
          <length>-1</length>
          <name>constant</name>
          <precision>-1</precision>
          <text>Y</text>
          <type>Boolean</type>
        </value>
      </condition>
    </compare>
    <send_true_to>Unique rows</send_true_to>
    <attributes/>
    <GUI>
      <xloc>1936</xloc>
      <yloc>512</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Filter_null_parental_leave_dates</name>
    <type>FilterRows</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <compare>
      <condition>
        <conditions>
</conditions>
        <function>IS NOT NULL</function>
        <leftvalue>academ_reason</leftvalue>
        <negated>N</negated>
        <operator>-</operator>
      </condition>
    </compare>
    <send_true_to>block_until_main_finished</send_true_to>
    <attributes/>
    <GUI>
      <xloc>1120</xloc>
      <yloc>640</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Unique rows</name>
    <type>Unique</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <count_rows>N</count_rows>
    <fields>
      <field>
        <case_insensitive>N</case_insensitive>
        <name>recruit_id</name>
      </field>
    </fields>
    <reject_duplicate_row>N</reject_duplicate_row>
    <attributes/>
    <GUI>
      <xloc>1936</xloc>
      <yloc>384</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Update</name>
    <type>Update</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <commit>10000</commit>
    <connection>ervu-dashboard</connection>
    <error_ignored>N</error_ignored>
    <lookup>
      <key>
        <condition>=</condition>
        <field>recruit_id</field>
        <name>recruit_id</name>
      </key>
      <schema>ervu_dashboard</schema>
      <table>citizen</table>
      <value>
        <name>has_educational_institution_info</name>
        <rename>has_educational_institution_info</rename>
      </value>
    </lookup>
    <skip_lookup>N</skip_lookup>
    <use_batch>Y</use_batch>
    <attributes/>
    <GUI>
      <xloc>1504</xloc>
      <yloc>784</yloc>
    </GUI>
  </transform>
  <transform>
    <name>block_until_main_finished</name>
    <type>BlockUntilTransformsFinish</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <transforms>
      <transform>
        <name>upsert_edu_inst_info</name>
      </transform>
    </transforms>
    <attributes/>
    <GUI>
      <xloc>1312</xloc>
      <yloc>640</yloc>
    </GUI>
  </transform>
  <transform>
    <name>education_input</name>
    <type>TableInput</type>
    <description/>
    <distribute>N</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <connection>ervu-dashboard</connection>
    <execute_each_row>N</execute_each_row>
    <sql>WITH filteredData AS (SELECT ri.recruit_id,
                             education_elem,
                             academ_elem,
                             'Образовательная организация высшего образования' as educational_institution_type,
				 ri.ctid
                      FROM ervu_dashboard.recruits_info ri
                               CROSS JOIN LATERAL jsonb_array_elements(
                              ri.info -> 'svedFL' -> 'svedVUZ' -> 'vuz') AS education_elem
                               LEFT JOIN LATERAL jsonb_array_elements(
                              CASE
                                  WHEN jsonb_typeof(education_elem -> 'svedOtpusk') = 'array'
                                      THEN education_elem -> 'svedOtpusk'
                                  ELSE '[]'::jsonb
                                  END
                                                 ) AS academ_elem ON true
                      WHERE jsonb_typeof(ri.info -> 'svedFL' -> 'svedVUZ' -> 'vuz') = 'array'
                        AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))

                      union all

                      SELECT ri.recruit_id,
                             education_elem,
                             academ_elem,
                             'Профессиональная образовательная организация' as educational_institution_type,
				 ri.ctid
                      FROM ervu_dashboard.recruits_info ri
                               CROSS JOIN LATERAL jsonb_array_elements(
                              ri.info -> 'svedFL' -> 'svedKolledzh' -> 'kolledzh') AS education_elem
                               LEFT JOIN LATERAL jsonb_array_elements(
                              CASE
                                  WHEN jsonb_typeof(education_elem -> 'svedOtpusk') = 'array'
                                      THEN education_elem -> 'svedOtpusk'
                                  ELSE '[]'::jsonb
                                  END
                                                 ) AS academ_elem ON true
                      WHERE jsonb_typeof(ri.info -> 'svedFL' -> 'svedKolledzh' -> 'kolledzh') = 'array'
                        AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}'))

                      union all

                      SELECT ri.recruit_id,
                             education_elem,
                             academ_elem,
                             'Общеобразовательная организация' as educational_institution_type,
 				 ri.ctid
                      FROM ervu_dashboard.recruits_info ri
                               CROSS JOIN LATERAL jsonb_array_elements(
                              ri.info -> 'svedFL' -> 'svedSHkola' -> 'shkola') AS education_elem
                               LEFT JOIN LATERAL jsonb_array_elements(
                              CASE
                                  WHEN jsonb_typeof(education_elem -> 'svedOtpusk') = 'array'
                                      THEN education_elem -> 'svedOtpusk'
                                  ELSE '[]'::jsonb
                                  END
                                                 ) AS academ_elem ON true
                      WHERE jsonb_typeof(ri.info -> 'svedFL' -> 'svedSHkola' -> 'shkola') = 'array'
                        AND (ri.current_recruitment_id = '${IDM_ID}' or (ri.current_recruitment_id is null and ri.target_recruitment_id = '${IDM_ID}')))
SELECT education_elem ->> 'id'                                                                                       AS source_id,
       fd.recruit_id,
       to_date(education_elem ->> 'dataSved', 'YYYY-MM-DD')                                                          as source_update_date,
       educational_institution_type,
       education_elem -> 'svedOrg' ->> 'naimTipOrg'                                                                  as org_type,
       education_elem -> 'svedOrg' ->> 'inn'                                                                         as inn,
       education_elem -> 'svedOrg' ->> 'kpp'                                                                         as kpp,
       coalesce(education_elem -> 'svedOrg' ->> 'ogrn', education_elem -> 'svedOrg' ->>
                                                        'ogrnip')                                                    as ogrn,
       education_elem -> 'svedOrg' ->> 'adresOrg'                                                                    as educational_institution_address,
       education_elem -> 'svedOrg' ->> 'naimOrg'                                                                     as educational_institution_name,
       education_elem -> 'svedOrg' -> 'extend' ->> 'statusOrg'                                                       as educational_institution_status_code,
       education_elem -> 'svedOrg' -> 'extend' ->> 'vidPodrazdOrg'                                                   as educational_organization_separate_unit_type,
       education_elem -> 'svedOrg' -> 'extend' ->> 'adresPodrazdOrg'                                                 as educational_organization_separate_unit_address,
       education_elem ->> 'naimStatus'                                                                               as student_status,
       case
           when educational_institution_type = 'Образовательная организация высшего образования'
               then education_elem ->> 'nomerKursa'
           when educational_institution_type = 'Профессиональная образовательная организация'
               then education_elem -> 'extend' ->> 'klass'
           when educational_institution_type = 'Общеобразовательная организация' then education_elem ->> 'klass'
           end                                                                                                       as grade_number,
       education_elem ->> 'kodUrovObr'                                                                               as education_level_code,
       to_date(coalesce(education_elem -> 'extend' ->> 'dataPostup', education_elem ->> 'dataPostup'),
               'YYYY-MM-DD')                                                                                         as admission_date,
       to_date(education_elem ->> 'dataZachisl', 'YYYY-MM-DD')                                                       as enrollment_date,
       education_elem ->> 'nomPrikazZachisl'                                                                         as enrollment_order_number,
       to_date(education_elem ->> 'dataPrikazZachisl', 'YYYY-MM-DD')                                                 as enrollment_order_date,
       to_date(coalesce(education_elem -> 'extend' ->> 'dataZavershObuch', education_elem ->> 'dataOkonch'),
               'YYYY-MM-DD')                                                                                         as completion_date,
       education_elem -> 'svedObrProg' ->> 'naimFormaObuch'                                                          as education_form,
       to_date(education_elem -> 'svedObrProg' ->> 'dataNachObuch', 'YYYY-MM-DD')                                    as education_program_start_date,
       to_date(education_elem -> 'extend' ->> 'dataNachObuch', 'YYYY-MM-DD')                                         as education_start_date,
       to_date(coalesce(education_elem -> 'svedObrProg' ->> 'planDataOkonch', education_elem ->> 'dataOzhid'),
               'YYYY-MM-DD')                                                                                         as planned_completion_date,
       education_elem -> 'svedObrProg' -> 'svedSpeczMinobr' ->> 'kodSpecz'                                           as minobr_speciality_code,
       education_elem -> 'svedObrProg' -> 'svedSpeczMinprosv' ->> 'kodSpecz'                                         as minprosv_speciality_code,
       coalesce(education_elem ->> 'svedVosst' &lt;&gt; 'null', false)                                                     as recovery_info,
       to_date(education_elem -> 'svedVosst' ->> 'dataVosst', 'YYYY-MM-DD')                                          as recovery_date,
       to_date(education_elem -> 'svedVosst' ->> 'dataPrikazVosst',
               'YYYY-MM-DD')                                                                                         as recovery_order_date,
       education_elem -> 'svedVosst' ->> 'nomPrikazVosst'                                                            as recovery_order_number,
       coalesce(education_elem ->> 'svedOtchisl' &lt;&gt; 'null', false)                                                   as expulsion_info,
       to_date(education_elem -> 'svedOtchisl' ->> 'dataOtchisl', 'YYYY-MM-DD')                                      as expulsion_date,
       to_date(education_elem -> 'svedOtchisl' ->> 'dataPrikazOtchisl',
               'YYYY-MM-DD')                                                                                         as expulsion_order_date,
       education_elem -> 'svedOtchisl' ->> 'nomPrikazOtchisl'                                                        as expulsion_order_number,
       coalesce(education_elem ->> 'svedOtpusk' &lt;&gt; 'null', false)                                                    as academical_leave_info,
       coalesce(education_elem ->> 'prPervObuch' = '1', false)                                                       as first_education,
       coalesce(education_elem -> 'svedObrProg' ->> 'prVUSpecz' = '1', false)                                        as vus_spec,
       coalesce(education_elem ->> 'svedVoenObuch' &lt;&gt; 'null', false)                                                 as military_center_education_info,
       to_date(education_elem -> 'svedVoenObuch' ->> 'dataNach', 'YYYY-MM-DD')                                       as military_center_education_start_date,
       to_date(education_elem -> 'svedVoenObuch' ->> 'dataOkonch',
               'YYYY-MM-DD')                                                                                         as military_center_education_end_date,
       education_elem -> 'svedVoenObuch' -> 'extend' ->> 'srokObuch'                                                 as military_center_education_period,
       coalesce(education_elem -> 'svedVoenObuch' -> 'extend' ->> 'svedUspeshZaverObuch' = '1',
                false)                                                                                               as military_center_completion,
       coalesce(education_elem -> 'extend' ->> 'svedVoenKaf' &lt;&gt; 'null', false)                                       as military_department_education_info,
       to_date(education_elem -> 'extend' -> 'svedVoenKaf' ->> 'dataNach',
               'YYYY-MM-DD')                                                                                         as military_department_start_date,
       to_date(education_elem -> 'extend' -> 'svedVoenKaf' ->> 'dataOkonch',
               'YYYY-MM-DD')                                                                                         as military_department_end_date,
       to_date(academ_elem ->> 'dataNach', 'YYYY-MM-DD')                                                              as academ_start_date,
       to_date(academ_elem ->> 'dataOkonch', 'YYYY-MM-DD')                                                            as academ_end_date,
       academ_elem -> 'naimPrichOtpusk'                                                                              as academ_reason,
	true as has_educational_institution_info,
       fd.ctid = (SELECT max(ctid) FROM filteredData) AS last_row
FROM filteredData fd;</sql>
    <variables_active>Y</variables_active>
    <attributes/>
    <GUI>
      <xloc>864</xloc>
      <yloc>640</yloc>
    </GUI>
  </transform>
  <transform>
    <name>sort_by_recruit_id</name>
    <type>SortRows</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <directory>${java.io.tmpdir}</directory>
    <prefix>srt</prefix>
    <sort_size>100000</sort_size>
    <free_memory/>
    <compress>N</compress>
    <compress_variable/>
    <unique_rows>Y</unique_rows>
    <fields>
      <field>
        <name>recruit_id</name>
        <ascending>Y</ascending>
        <case_sensitive>N</case_sensitive>
        <collator_enabled>N</collator_enabled>
        <collator_strength>0</collator_strength>
        <presorted>N</presorted>
      </field>
    </fields>
    <attributes/>
    <GUI>
      <xloc>1120</xloc>
      <yloc>784</yloc>
    </GUI>
  </transform>
  <transform>
    <name>sort_by_source_id</name>
    <type>SortRows</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <directory>${java.io.tmpdir}</directory>
    <prefix>srt</prefix>
    <sort_size>100000</sort_size>
    <free_memory/>
    <compress>N</compress>
    <compress_variable/>
    <unique_rows>Y</unique_rows>
    <fields>
      <field>
        <name>source_id</name>
        <ascending>Y</ascending>
        <case_sensitive>N</case_sensitive>
        <collator_enabled>N</collator_enabled>
        <collator_strength>0</collator_strength>
        <presorted>N</presorted>
      </field>
    </fields>
    <attributes/>
    <GUI>
      <xloc>1120</xloc>
      <yloc>512</yloc>
    </GUI>
  </transform>
  <transform>
    <name>upsert_edu_inst_info</name>
    <type>InsertUpdate</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <commit>10000</commit>
    <connection>ervu-dashboard</connection>
    <lookup>
      <key>
        <condition>=</condition>
        <field>source_id</field>
        <name>source_id</name>
        <name2/>
      </key>
      <schema>ervu_dashboard</schema>
      <table>educational_institution_learning</table>
      <value>
        <name>source_id</name>
        <rename>source_id</rename>
        <update>Y</update>
      </value>
      <value>
        <name>recruit_id</name>
        <rename>recruit_id</rename>
        <update>Y</update>
      </value>
      <value>
        <name>source_update_date</name>
        <rename>source_update_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>educational_institution_type</name>
        <rename>educational_institution_type</rename>
        <update>Y</update>
      </value>
      <value>
        <name>org_type</name>
        <rename>org_type</rename>
        <update>Y</update>
      </value>
      <value>
        <name>inn</name>
        <rename>inn</rename>
        <update>Y</update>
      </value>
      <value>
        <name>kpp</name>
        <rename>kpp</rename>
        <update>Y</update>
      </value>
      <value>
        <name>ogrn</name>
        <rename>ogrn</rename>
        <update>Y</update>
      </value>
      <value>
        <name>educational_institution_address</name>
        <rename>educational_institution_address</rename>
        <update>Y</update>
      </value>
      <value>
        <name>educational_organization_separate_unit_type</name>
        <rename>educational_organization_separate_unit_type</rename>
        <update>Y</update>
      </value>
      <value>
        <name>educational_organization_separate_unit_address</name>
        <rename>educational_organization_separate_unit_address</rename>
        <update>Y</update>
      </value>
      <value>
        <name>student_status</name>
        <rename>student_status</rename>
        <update>Y</update>
      </value>
      <value>
        <name>grade_number</name>
        <rename>grade_number</rename>
        <update>Y</update>
      </value>
      <value>
        <name>education_level_code</name>
        <rename>education_level_code</rename>
        <update>Y</update>
      </value>
      <value>
        <name>admission_date</name>
        <rename>admission_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>enrollment_date</name>
        <rename>enrollment_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>enrollment_order_number</name>
        <rename>enrollment_order_number</rename>
        <update>Y</update>
      </value>
      <value>
        <name>enrollment_order_date</name>
        <rename>enrollment_order_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>completion_date</name>
        <rename>completion_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>education_form</name>
        <rename>education_form</rename>
        <update>Y</update>
      </value>
      <value>
        <name>education_program_start_date</name>
        <rename>education_program_start_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>education_start_date</name>
        <rename>education_start_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>planned_completion_date</name>
        <rename>planned_completion_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>minobr_speciality_code</name>
        <rename>minobr_speciality_code</rename>
        <update>Y</update>
      </value>
      <value>
        <name>minprosv_speciality_code</name>
        <rename>minprosv_speciality_code</rename>
        <update>Y</update>
      </value>
      <value>
        <name>recovery_info</name>
        <rename>recovery_info</rename>
        <update>Y</update>
      </value>
      <value>
        <name>recovery_date</name>
        <rename>recovery_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>recovery_order_date</name>
        <rename>recovery_order_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>recovery_order_number</name>
        <rename>recovery_order_number</rename>
        <update>Y</update>
      </value>
      <value>
        <name>expulsion_info</name>
        <rename>expulsion_info</rename>
        <update>Y</update>
      </value>
      <value>
        <name>expulsion_date</name>
        <rename>expulsion_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>expulsion_order_date</name>
        <rename>expulsion_order_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>expulsion_order_number</name>
        <rename>expulsion_order_number</rename>
        <update>Y</update>
      </value>
      <value>
        <name>academical_leave_info</name>
        <rename>academical_leave_info</rename>
        <update>Y</update>
      </value>
      <value>
        <name>first_education</name>
        <rename>first_education</rename>
        <update>Y</update>
      </value>
      <value>
        <name>vus_spec</name>
        <rename>vus_spec</rename>
        <update>Y</update>
      </value>
      <value>
        <name>military_center_education_info</name>
        <rename>military_center_education_info</rename>
        <update>Y</update>
      </value>
      <value>
        <name>military_center_education_start_date</name>
        <rename>military_center_education_start_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>military_center_education_end_date</name>
        <rename>military_center_education_end_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>military_center_education_period</name>
        <rename>military_center_education_period</rename>
        <update>Y</update>
      </value>
      <value>
        <name>military_center_completion</name>
        <rename>military_center_completion</rename>
        <update>Y</update>
      </value>
      <value>
        <name>military_department_education_info</name>
        <rename>military_department_education_info</rename>
        <update>Y</update>
      </value>
      <value>
        <name>military_department_start_date</name>
        <rename>military_department_start_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>military_department_end_date</name>
        <rename>military_department_end_date</rename>
        <update>Y</update>
      </value>
    </lookup>
    <update_bypassed>Y</update_bypassed>
    <attributes/>
    <GUI>
      <xloc>1504</xloc>
      <yloc>512</yloc>
    </GUI>
  </transform>
  <transform>
    <name>upsert_educational_leave</name>
    <type>InsertUpdate</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <commit>10000</commit>
    <connection>ervu-dashboard</connection>
    <lookup>
      <key>
        <condition>=</condition>
        <field>educational_institution_learning_source_id</field>
        <name>source_id</name>
        <name2/>
      </key>
      <schema>ervu_dashboard</schema>
      <table>educational_leave</table>
      <value>
        <name>educational_institution_learning_source_id</name>
        <rename>source_id</rename>
        <update>Y</update>
      </value>
      <value>
        <name>start_date</name>
        <rename>academ_start_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>end_date</name>
        <rename>academ_end_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>reason</name>
        <rename>academ_reason</rename>
        <update>Y</update>
      </value>
    </lookup>
    <update_bypassed>Y</update_bypassed>
    <attributes/>
    <GUI>
      <xloc>1504</xloc>
      <yloc>640</yloc>
    </GUI>
  </transform>
  <transform_error_handling>
    <error>
      <source_transform>Update</source_transform>
      <target_transform>Change job status on error</target_transform>
      <is_enabled>Y</is_enabled>
      <nr_valuename/>
      <descriptions_valuename>error_description</descriptions_valuename>
      <fields_valuename/>
      <codes_valuename/>
      <max_errors/>
      <max_pct_errors/>
      <min_pct_rows/>
    </error>
    <error>
      <source_transform>upsert_edu_inst_info</source_transform>
      <target_transform>Change job status on error</target_transform>
      <is_enabled>Y</is_enabled>
      <nr_valuename/>
      <descriptions_valuename/>
      <fields_valuename/>
      <codes_valuename/>
      <max_errors/>
      <max_pct_errors/>
      <min_pct_rows/>
    </error>
    <error>
      <source_transform>upsert_educational_leave</source_transform>
      <target_transform>Change job status on error</target_transform>
      <is_enabled>Y</is_enabled>
      <nr_valuename/>
      <descriptions_valuename>error_description</descriptions_valuename>
      <fields_valuename/>
      <codes_valuename/>
      <max_errors/>
      <max_pct_errors/>
      <min_pct_rows/>
    </error>
  </transform_error_handling>
  <attributes/>
</pipeline>
