<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
  <info>
    <name>drivers_licence_flow_delta</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>2025/08/11 13:22:56.048</created_date>
    <modified_user>-</modified_user>
    <modified_date>2025/08/11 13:22:56.048</modified_date>
  </info>
  <notepads>
  </notepads>
  <order>
    <hop>
      <from>driver_lisence_failure_job</from>
      <to>Abort 2</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>driver_license_job_create</from>
      <to>Table input 2</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>driver_licence_insert_or_update</from>
      <to>driver_lisence_failure_job</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>update_driver_licence_flag</from>
      <to>driver_lisence_failure_job</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Table input 2</from>
      <to>driver_licence_need_update_filter</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Table input 2</from>
      <to>driver_licence_group_by_recruit_id</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Table input 2</from>
      <to>driver_licence_need_delete_filter</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>driver_licence_need_update_filter</from>
      <to>driver_licence_insert_or_update</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Identify last row in a stream 2 2</from>
      <to>Filter rows 2</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>driver_licence_group_by_recruit_id</from>
      <to>update_driver_licence_flag</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Filter rows 2</from>
      <to>driver_licence_success_job</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>driver_licence_need_delete_filter</from>
      <to>delete_act_tractor</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>delete_act_tractor</from>
      <to>Detect empty stream</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Detect empty stream</from>
      <to>Identify last row in a stream 2 2</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>driver_licence_insert_or_update</from>
      <to>Detect empty stream 2</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Detect empty stream 2</from>
      <to>Identify last row in a stream 2 2</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>delete_act_tractor</from>
      <to>driver_lisence_failure_job</to>
      <enabled>Y</enabled>
    </hop>
  </order>
  <transform>
    <name>Abort 2</name>
    <type>Abort</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <abort_option>ABORT_WITH_ERROR</abort_option>
    <always_log_rows>Y</always_log_rows>
    <row_threshold>0</row_threshold>
    <attributes/>
    <GUI>
      <xloc>1744</xloc>
      <yloc>1328</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>1408</xloc>
      <yloc>1136</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Detect empty stream 2</name>
    <type>DetectEmptyStream</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <attributes/>
    <GUI>
      <xloc>1568</xloc>
      <yloc>1232</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Filter rows 2</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>driver_licence_success_job</send_true_to>
    <attributes/>
    <GUI>
      <xloc>1760</xloc>
      <yloc>1136</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Identify last row in a stream 2 2</name>
    <type>DetectLastRow</type>
    <description/>
    <distribute>N</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <resultfieldname>last_row</resultfieldname>
    <attributes/>
    <GUI>
      <xloc>1568</xloc>
      <yloc>1136</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Table input 2</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
    base AS (
        SELECT
            ri.recruit_id recruit_id,
            ri.info,
            jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array' as has_driver_license_info,
            (ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM') IS NOT NULL as has_akt_utm_info,
            (ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM') IS NOT NULL as has_pred_utm_info,
            CASE
                WHEN jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'
                    THEN to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'dataSved', 'YYYY-MM-DD')
                END as driver_update_date,
            CASE
                WHEN ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' IS NOT NULL
                    THEN to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataSved', 'YYYY-MM-DD')
                END as akt_update_date,
            CASE
                WHEN ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM' IS NOT NULL
                    THEN to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'dataSved', 'YYYY-MM-DD')
                END as pred_update_date
        FROM ervu_dashboard.recruits_info ri
        JOIN ervu_dashboard.citizen r ON r.recruit_id = ri.recruit_id AND '${IDM_ID}' != ''  -- Проверка на пустую строку
            AND COALESCE(ri.current_recruitment_id, ri.target_recruitment_id) = '${IDM_ID}'
        WHERE (jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'
            OR ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM' IS NOT NULL
            OR ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM' IS NOT NULL)
    ),
    all_data AS (
        -- Водительские права (обычные)
        SELECT
            ri.recruit_id,
            (ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->> 'id') as source_id,
            ri.driver_update_date AS source_update_date,
            ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'kodStatus' AS status,
            ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'serNomDok' AS licence_series,
            NULL AS licence_number,
            array_to_string(array(
                SELECT kat->>'naimKatTS'
                FROM jsonb_array_elements(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') AS kat
                WHERE jsonb_typeof(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->'svedKat') = 'array'), ',') AS categories,
            to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'dataVydDok', 'YYYY-MM-DD') AS start_date,
            to_date(ri.info->'svedFL'->'svedVoditUdost'->'voditUdost'->>'srokDeistvDok', 'YYYY-MM-DD') AS close_date,
            NULL AS replacement_date,
            NULL AS return_date,
            false AS tractor_driver,
            ri.driver_update_date > '${MAX_SOURCE_UPDATE_DATE}'::date as need_update,
            false as need_to_delete
        FROM base ri
        where ri.has_driver_license_info

        UNION ALL

        -- Актуальные трактористские права (aktUTM)
        SELECT
            ri.recruit_id,
            (ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->> 'id') as source_id,
            ri.akt_update_date AS source_update_date,
            '1' AS status,
            ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'serUTM' AS licence_series,
            ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'nomUTM' AS licence_number,
            (SELECT array_to_string(ARRAY(SELECT jsonb_array_elements_text(
                ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->'extend'->'kodKatUTM')), ',')) AS categories,
            to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataVydUTM', 'YYYY-MM-DD') AS start_date,
            to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataOkonchUTM', 'YYYY-MM-DD') AS close_date,
            to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataZameny', 'YYYY-MM-DD') AS replacement_date,
            to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'aktUTM'->>'dataVozvr', 'YYYY-MM-DD') AS return_date,
            true AS tractor_driver,
            ri.akt_update_date > '${MAX_SOURCE_UPDATE_DATE}'::date as need_update,
            false as need_to_delete  -- актуальные права не помечаем на удаление
        FROM base ri
        WHERE ri.has_akt_utm_info

        UNION ALL

        -- Предыдущие трактористские права (predUTM)
        SELECT
            ri.recruit_id,
            (ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->> 'id') as source_id,
            ri.pred_update_date AS source_update_date,
            '0' AS status,
            ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'serUTM' AS licence_series,
            ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'nomUTM' AS licence_number,
            (SELECT array_to_string(ARRAY(SELECT jsonb_array_elements_text(
                ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->'extend'->'kodKatUTM')), ',')) AS categories,
            to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'dataVydUTM', 'YYYY-MM-DD') AS start_date,
            to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'dataOkonchUTM', 'YYYY-MM-DD') AS close_date,
            to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'dataZameny', 'YYYY-MM-DD') AS replacement_date,
            to_date(ri.info->'svedFL'->'svedUdostTraktMash'->'udostTraktMash'->'predUTM'->>'dataVozvr', 'YYYY-MM-DD') AS return_date,
            true AS tractor_driver,
            ri.pred_update_date > '${MAX_SOURCE_UPDATE_DATE}'::date as need_update,
            false as need_to_delete
        FROM base ri
        WHERE ri.has_pred_utm_info

        UNION ALL
        -- Актуальные трактористские права на удаление
        SELECT
            ri.recruit_id,
            NULL as source_id,
            NULL AS source_update_date,
            '1' AS status,
            NULL AS licence_series,
            NULL AS licence_number,
            NULL AS categories,
            NULL AS start_date,
            NULL AS close_date,
            NULL AS replacement_date,
            NULL AS return_date,
            true AS tractor_driver,
            false as need_update,
            true as need_to_delete
        FROM base ri
        WHERE ri.has_pred_utm_info AND NOT ri.has_akt_utm_info and ri.pred_update_date > '${MAX_SOURCE_UPDATE_DATE}'::date
    )
SELECT
    *,
    CASE
        WHEN tractor_driver = false AND status = '1' THEN TRUE
        ELSE FALSE
        END AS has_driver_license,
    CASE
        WHEN tractor_driver = true AND status = '1' AND NOT need_to_delete THEN TRUE
        ELSE FALSE
        END AS has_tractor_license
FROM all_data
ORDER BY recruit_id</sql>
    <variables_active>Y</variables_active>
    <attributes/>
    <GUI>
      <xloc>768</xloc>
      <yloc>1264</yloc>
    </GUI>
  </transform>
  <transform>
    <name>delete_act_tractor</name>
    <type>Delete</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>recruit_id</field>
        <name>recruit_id</name>
      </key>
      <key>
        <condition>=</condition>
        <field>tractor_driver</field>
        <name>tractor_driver</name>
      </key>
      <key>
        <condition>=</condition>
        <field>status</field>
        <name>status</name>
      </key>
      <schema>ervu_dashboard</schema>
      <table>drivers_licence</table>
    </lookup>
    <attributes/>
    <GUI>
      <xloc>1248</xloc>
      <yloc>1136</yloc>
    </GUI>
  </transform>
  <transform>
    <name>driver_licence_group_by_recruit_id</name>
    <type>GroupBy</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <add_linenr>N</add_linenr>
    <all_rows>N</all_rows>
    <directory>${java.io.tmpdir}</directory>
    <fields>
      <field>
        <aggregate>has_driver_license</aggregate>
        <subject>has_driver_license</subject>
        <type>MAX</type>
      </field>
      <field>
        <aggregate>has_tractor_license</aggregate>
        <subject>has_tractor_license</subject>
        <type>MAX</type>
      </field>
    </fields>
    <give_back_row>N</give_back_row>
    <group>
      <field>
        <name>recruit_id</name>
      </field>
    </group>
    <ignore_aggregate>N</ignore_aggregate>
    <prefix>grp</prefix>
    <attributes/>
    <GUI>
      <xloc>768</xloc>
      <yloc>1520</yloc>
    </GUI>
  </transform>
  <transform>
    <name>driver_licence_insert_or_update</name>
    <type>InsertUpdate</type>
    <description/>
    <distribute>N</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>
      </key>
      <schema>ervu_dashboard</schema>
      <table>drivers_licence</table>
      <value>
        <name>recruit_id</name>
        <rename>recruit_id</rename>
        <update>N</update>
      </value>
      <value>
        <name>status</name>
        <rename>status</rename>
        <update>Y</update>
      </value>
      <value>
        <name>licence_series</name>
        <rename>licence_series</rename>
        <update>Y</update>
      </value>
      <value>
        <name>licence_number</name>
        <rename>licence_number</rename>
        <update>Y</update>
      </value>
      <value>
        <name>categories</name>
        <rename>categories</rename>
        <update>Y</update>
      </value>
      <value>
        <name>start_date</name>
        <rename>start_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>close_date</name>
        <rename>close_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>replacement_date</name>
        <rename>replacement_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>return_date</name>
        <rename>return_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>tractor_driver</name>
        <rename>tractor_driver</rename>
        <update>Y</update>
      </value>
      <value>
        <name>source_update_date</name>
        <rename>source_update_date</rename>
        <update>Y</update>
      </value>
      <value>
        <name>source_id</name>
        <rename>source_id</rename>
        <update>N</update>
      </value>
    </lookup>
    <update_bypassed>N</update_bypassed>
    <attributes/>
    <GUI>
      <xloc>1232</xloc>
      <yloc>1328</yloc>
    </GUI>
  </transform>
  <transform>
    <name>driver_licence_need_delete_filter</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>need_to_delete</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_false_to>Sample rows</send_false_to>
    <send_true_to>delete_act_tractor</send_true_to>
    <attributes/>
    <GUI>
      <xloc>1008</xloc>
      <yloc>1136</yloc>
    </GUI>
  </transform>
  <transform>
    <name>driver_licence_need_update_filter</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>need_update</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_false_to>Sample rows</send_false_to>
    <send_true_to>driver_licence_insert_or_update</send_true_to>
    <attributes/>
    <GUI>
      <xloc>992</xloc>
      <yloc>1328</yloc>
    </GUI>
  </transform>
  <transform>
    <name>driver_licence_success_job</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 = 'DELTA_SUCCESS',
    execution_end_datetime = current_timestamp
WHERE job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';

</sql>
    <attributes/>
    <GUI>
      <xloc>1760</xloc>
      <yloc>976</yloc>
    </GUI>
  </transform>
  <transform>
    <name>driver_license_job_create</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>UPDATE etl.job_execution  
SET
    status = 'DELTA_PROCESSING',
    execution_datetime = DEFAULT,
    error_description = NULL
where job_name = '${JOB_NAME}'
and recruitment_id = '${IDM_ID}';</sql>
    <attributes/>
    <GUI>
      <xloc>432</xloc>
      <yloc>1264</yloc>
    </GUI>
  </transform>
  <transform>
    <name>driver_lisence_failure_job</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 = 'DELTA_ERROR',
    error_description = ?,
    execution_end_datetime = current_timestamp
WHERE job_name = '${JOB_NAME}' 
and recruitment_id = '${IDM_ID}';

</sql>
    <attributes/>
    <GUI>
      <xloc>1552</xloc>
      <yloc>1328</yloc>
    </GUI>
  </transform>
  <transform>
    <name>update_driver_licence_flag</name>
    <type>Update</type>
    <description/>
    <distribute>N</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <commit>10000</commit>
    <connection>ervu-dashboard</connection>
    <error_ignored>Y</error_ignored>
    <lookup>
      <key>
        <condition>=</condition>
        <field>recruit_id</field>
        <name>recruit_id</name>
      </key>
      <schema>ervu_dashboard</schema>
      <table>citizen</table>
      <value>
        <name>tractor_license</name>
        <rename>has_tractor_license</rename>
      </value>
      <value>
        <name>has_driver_license</name>
        <rename>has_driver_license</rename>
      </value>
    </lookup>
    <skip_lookup>N</skip_lookup>
    <use_batch>Y</use_batch>
    <attributes/>
    <GUI>
      <xloc>1552</xloc>
      <yloc>1520</yloc>
    </GUI>
  </transform>
  <transform_error_handling>
    <error>
      <source_transform>delete_act_tractor</source_transform>
      <target_transform>driver_lisence_failure_job</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>driver_licence_insert_or_update</source_transform>
      <target_transform>driver_lisence_failure_job</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>update_driver_licence_flag</source_transform>
      <target_transform>driver_lisence_failure_job</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>
