<?xml version="1.0" encoding="UTF-8"?>
<pipeline>
  <info>
    <name>checkpoint_job_citizen_criminal_liability_fz53_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/06/03 14:19:02.590</created_date>
    <modified_user>-</modified_user>
    <modified_date>2025/06/03 14:19:02.590</modified_date>
  </info>
  <notepads>
  </notepads>
  <order>
    <hop>
      <from>Filter rows</from>
      <to>Abort</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>JSON input state_child_flow1.json</from>
      <to>Filter rows</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>JSON input state_child_flow2.json</from>
      <to>Filter rows</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>JSON input state_child_flow3.json</from>
      <to>Filter rows</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>JSON input state_child_flow4.json</from>
      <to>Filter rows</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>JSON input state_child_flow5.json</from>
      <to>Filter rows</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>Table input</from>
      <to>Insert / update</to>
      <enabled>Y</enabled>
    </hop>
    <hop>
      <from>Dummy (do nothing)</from>
      <to>JSON input state_child_flow1.json</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>Dummy (do nothing)</from>
      <to>JSON input state_child_flow2.json</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>Dummy (do nothing)</from>
      <to>JSON input state_child_flow3.json</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>Dummy (do nothing)</from>
      <to>JSON input state_child_flow4.json</to>
      <enabled>N</enabled>
    </hop>
    <hop>
      <from>Dummy (do nothing)</from>
      <to>JSON input state_child_flow5.json</to>
      <enabled>N</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_WITH_ERROR</abort_option>
    <always_log_rows>Y</always_log_rows>
    <row_threshold>0</row_threshold>
    <attributes/>
    <GUI>
      <xloc>1264</xloc>
      <yloc>592</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Dummy (do nothing)</name>
    <type>Dummy</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <attributes/>
    <GUI>
      <xloc>352</xloc>
      <yloc>592</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>
          <condition>
            <conditions>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>pipeline</leftvalue>
                <negated>N</negated>
                <operator>-</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>child_flow1</text>
                  <type>String</type>
                </value>
              </condition>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>status</leftvalue>
                <negated>N</negated>
                <operator>AND</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>ERROR</text>
                  <type>String</type>
                </value>
              </condition>
            </conditions>
            <function>=</function>
            <leftvalue>pipeline</leftvalue>
            <negated>N</negated>
            <operator>-</operator>
            <value>
              <isnull>N</isnull>
              <length>-1</length>
              <name>constant</name>
              <precision>-1</precision>
              <text>recruits_info_flow1</text>
              <type>String</type>
            </value>
          </condition>
          <condition>
            <conditions>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>pipeline</leftvalue>
                <negated>N</negated>
                <operator>-</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>child_flow2</text>
                  <type>String</type>
                </value>
              </condition>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>status</leftvalue>
                <negated>N</negated>
                <operator>AND</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>ERROR</text>
                  <type>String</type>
                </value>
              </condition>
            </conditions>
            <function>=</function>
            <leftvalue>pipeline</leftvalue>
            <negated>N</negated>
            <operator>OR</operator>
            <value>
              <isnull>N</isnull>
              <length>-1</length>
              <name>constant</name>
              <precision>-1</precision>
              <text>recruits_info_flow1</text>
              <type>String</type>
            </value>
          </condition>
          <condition>
            <conditions>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>pipeline</leftvalue>
                <negated>N</negated>
                <operator>-</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>child_flow3</text>
                  <type>String</type>
                </value>
              </condition>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>status</leftvalue>
                <negated>N</negated>
                <operator>AND</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>ERROR</text>
                  <type>String</type>
                </value>
              </condition>
            </conditions>
            <function>=</function>
            <leftvalue>pipeline</leftvalue>
            <negated>N</negated>
            <operator>OR</operator>
            <value>
              <isnull>N</isnull>
              <length>-1</length>
              <name>constant</name>
              <precision>-1</precision>
              <text>recruits_info_flow1</text>
              <type>String</type>
            </value>
          </condition>
          <condition>
            <conditions>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>pipeline</leftvalue>
                <negated>N</negated>
                <operator>-</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>child_flow4</text>
                  <type>String</type>
                </value>
              </condition>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>status</leftvalue>
                <negated>N</negated>
                <operator>AND</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>ERROR</text>
                  <type>String</type>
                </value>
              </condition>
            </conditions>
            <function>=</function>
            <leftvalue>pipeline</leftvalue>
            <negated>N</negated>
            <operator>OR</operator>
            <value>
              <isnull>N</isnull>
              <length>-1</length>
              <name>constant</name>
              <precision>-1</precision>
              <text>recruits_info_flow1</text>
              <type>String</type>
            </value>
          </condition>
          <condition>
            <conditions>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>pipeline</leftvalue>
                <negated>N</negated>
                <operator>-</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>child_flow5</text>
                  <type>String</type>
                </value>
              </condition>
              <condition>
                <conditions>
</conditions>
                <function>=</function>
                <leftvalue>status</leftvalue>
                <negated>N</negated>
                <operator>AND</operator>
                <value>
                  <isnull>N</isnull>
                  <length>-1</length>
                  <name>constant</name>
                  <precision>-1</precision>
                  <text>ERROR</text>
                  <type>String</type>
                </value>
              </condition>
            </conditions>
            <function>=</function>
            <leftvalue>pipeline</leftvalue>
            <negated>N</negated>
            <operator>OR</operator>
            <value>
              <isnull>N</isnull>
              <length>-1</length>
              <name>constant</name>
              <precision>-1</precision>
              <text>recruits_info_flow1</text>
              <type>String</type>
            </value>
          </condition>
        </conditions>
        <function>=</function>
        <leftvalue>pipeline</leftvalue>
        <negated>N</negated>
        <operator>-</operator>
        <value>
          <isnull>N</isnull>
          <length>-1</length>
          <name>constant</name>
          <precision>-1</precision>
          <text>recruits_info_flow1</text>
          <type>String</type>
        </value>
      </condition>
    </compare>
    <send_true_to>Abort</send_true_to>
    <attributes/>
    <GUI>
      <xloc>944</xloc>
      <yloc>592</yloc>
    </GUI>
  </transform>
  <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>job_name</field>
        <name>job_name</name>
      </key>
      <schema>public</schema>
      <table>etl_checkpoints</table>
      <value>
        <name>job_name</name>
        <rename>job_name</rename>
        <update>N</update>
      </value>
      <value>
        <name>record_created</name>
        <rename>record_created</rename>
        <update>Y</update>
      </value>
      <value>
        <name>status</name>
        <rename>status</rename>
        <update>Y</update>
      </value>
    </lookup>
    <update_bypassed>N</update_bypassed>
    <attributes/>
    <GUI>
      <xloc>1264</xloc>
      <yloc>208</yloc>
    </GUI>
  </transform>
  <transform>
    <name>JSON input state_child_flow1.json</name>
    <type>JsonInput</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <include>N</include>
    <include_field/>
    <rownum>N</rownum>
    <addresultfile>N</addresultfile>
    <readurl>N</readurl>
    <removeSourceField>N</removeSourceField>
    <IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
    <doNotFailIfNoFile>Y</doNotFailIfNoFile>
    <ignoreMissingPath>Y</ignoreMissingPath>
    <defaultPathLeafToNull>Y</defaultPathLeafToNull>
    <rownum_field/>
    <file>
      <name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow1.json</name>
      <filemask/>
      <exclude_filemask/>
      <file_required>N</file_required>
      <include_subfolders>N</include_subfolders>
    </file>
    <fields>
      <field>
        <name>pipeline</name>
        <path>$.pipeline</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
      <field>
        <name>status</name>
        <path>$.status</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
    </fields>
    <limit>0</limit>
    <IsInFields>N</IsInFields>
    <IsAFile>N</IsAFile>
    <valueField/>
    <shortFileFieldName/>
    <pathFieldName/>
    <hiddenFieldName/>
    <lastModificationTimeFieldName/>
    <uriNameFieldName/>
    <rootUriNameFieldName/>
    <extensionFieldName/>
    <sizeFieldName/>
    <attributes/>
    <GUI>
      <xloc>640</xloc>
      <yloc>432</yloc>
    </GUI>
  </transform>
  <transform>
    <name>JSON input state_child_flow2.json</name>
    <type>JsonInput</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <include>N</include>
    <include_field/>
    <rownum>N</rownum>
    <addresultfile>N</addresultfile>
    <readurl>N</readurl>
    <removeSourceField>N</removeSourceField>
    <IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
    <doNotFailIfNoFile>Y</doNotFailIfNoFile>
    <ignoreMissingPath>Y</ignoreMissingPath>
    <defaultPathLeafToNull>Y</defaultPathLeafToNull>
    <rownum_field/>
    <file>
      <name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow2.json</name>
      <filemask/>
      <exclude_filemask/>
      <file_required>N</file_required>
      <include_subfolders>N</include_subfolders>
    </file>
    <fields>
      <field>
        <name>pipeline</name>
        <path>$.pipeline</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
      <field>
        <name>status</name>
        <path>$.status</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
    </fields>
    <limit>0</limit>
    <IsInFields>N</IsInFields>
    <IsAFile>N</IsAFile>
    <valueField/>
    <shortFileFieldName/>
    <pathFieldName/>
    <hiddenFieldName/>
    <lastModificationTimeFieldName/>
    <uriNameFieldName/>
    <rootUriNameFieldName/>
    <extensionFieldName/>
    <sizeFieldName/>
    <attributes/>
    <GUI>
      <xloc>640</xloc>
      <yloc>512</yloc>
    </GUI>
  </transform>
  <transform>
    <name>JSON input state_child_flow3.json</name>
    <type>JsonInput</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <include>N</include>
    <include_field/>
    <rownum>N</rownum>
    <addresultfile>N</addresultfile>
    <readurl>N</readurl>
    <removeSourceField>N</removeSourceField>
    <IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
    <doNotFailIfNoFile>Y</doNotFailIfNoFile>
    <ignoreMissingPath>Y</ignoreMissingPath>
    <defaultPathLeafToNull>Y</defaultPathLeafToNull>
    <rownum_field/>
    <file>
      <name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow3.json</name>
      <filemask/>
      <exclude_filemask/>
      <file_required>N</file_required>
      <include_subfolders>N</include_subfolders>
    </file>
    <fields>
      <field>
        <name>pipeline</name>
        <path>$.pipeline</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
      <field>
        <name>status</name>
        <path>$.status</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
    </fields>
    <limit>0</limit>
    <IsInFields>N</IsInFields>
    <IsAFile>N</IsAFile>
    <valueField/>
    <shortFileFieldName/>
    <pathFieldName/>
    <hiddenFieldName/>
    <lastModificationTimeFieldName/>
    <uriNameFieldName/>
    <rootUriNameFieldName/>
    <extensionFieldName/>
    <sizeFieldName/>
    <attributes/>
    <GUI>
      <xloc>640</xloc>
      <yloc>592</yloc>
    </GUI>
  </transform>
  <transform>
    <name>JSON input state_child_flow4.json</name>
    <type>JsonInput</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <include>N</include>
    <include_field/>
    <rownum>N</rownum>
    <addresultfile>N</addresultfile>
    <readurl>N</readurl>
    <removeSourceField>N</removeSourceField>
    <IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
    <doNotFailIfNoFile>Y</doNotFailIfNoFile>
    <ignoreMissingPath>Y</ignoreMissingPath>
    <defaultPathLeafToNull>Y</defaultPathLeafToNull>
    <rownum_field/>
    <file>
      <name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow4.json</name>
      <filemask/>
      <exclude_filemask/>
      <file_required>N</file_required>
      <include_subfolders>N</include_subfolders>
    </file>
    <fields>
      <field>
        <name>pipeline</name>
        <path>$.pipeline</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
      <field>
        <name>status</name>
        <path>$.status</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
    </fields>
    <limit>0</limit>
    <IsInFields>N</IsInFields>
    <IsAFile>N</IsAFile>
    <valueField/>
    <shortFileFieldName/>
    <pathFieldName/>
    <hiddenFieldName/>
    <lastModificationTimeFieldName/>
    <uriNameFieldName/>
    <rootUriNameFieldName/>
    <extensionFieldName/>
    <sizeFieldName/>
    <attributes/>
    <GUI>
      <xloc>640</xloc>
      <yloc>672</yloc>
    </GUI>
  </transform>
  <transform>
    <name>JSON input state_child_flow5.json</name>
    <type>JsonInput</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <include>N</include>
    <include_field/>
    <rownum>N</rownum>
    <addresultfile>N</addresultfile>
    <readurl>N</readurl>
    <removeSourceField>N</removeSourceField>
    <IsIgnoreEmptyFile>N</IsIgnoreEmptyFile>
    <doNotFailIfNoFile>Y</doNotFailIfNoFile>
    <ignoreMissingPath>Y</ignoreMissingPath>
    <defaultPathLeafToNull>Y</defaultPathLeafToNull>
    <rownum_field/>
    <file>
      <name>${PROJECT_HOME}/info_recruits/citizen_tables/child/checkpoints/state_child_flow5.json</name>
      <filemask/>
      <exclude_filemask/>
      <file_required>N</file_required>
      <include_subfolders>N</include_subfolders>
    </file>
    <fields>
      <field>
        <name>pipeline</name>
        <path>$.pipeline</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
      <field>
        <name>status</name>
        <path>$.status</path>
        <type>String</type>
        <format/>
        <currency/>
        <decimal/>
        <group/>
        <length>-1</length>
        <precision>-1</precision>
        <trim_type>none</trim_type>
        <repeat>N</repeat>
      </field>
    </fields>
    <limit>0</limit>
    <IsInFields>N</IsInFields>
    <IsAFile>N</IsAFile>
    <valueField/>
    <shortFileFieldName/>
    <pathFieldName/>
    <hiddenFieldName/>
    <lastModificationTimeFieldName/>
    <uriNameFieldName/>
    <rootUriNameFieldName/>
    <extensionFieldName/>
    <sizeFieldName/>
    <attributes/>
    <GUI>
      <xloc>640</xloc>
      <yloc>752</yloc>
    </GUI>
  </transform>
  <transform>
    <name>Table input</name>
    <type>TableInput</type>
    <description/>
    <distribute>Y</distribute>
    <custom_distribution/>
    <copies>1</copies>
    <partitioning>
      <method>none</method>
      <schema_name/>
    </partitioning>
    <connection>ervu-dashboard</connection>
    <execute_each_row>N</execute_each_row>
    <limit>0</limit>
    <sql>WITH status_check AS (
    SELECT 
        bool_or(status = 'ERROR' AND job_name IN (
            'delta_citizen_criminal_liability_fz53_flow1', 
            'delta_citizen_criminal_liability_fz53_flow2', 
            'delta_citizen_criminal_liability_fz53_flow3', 
            'delta_citizen_criminal_liability_fz53_flow4', 
            'delta_citizen_criminal_liability_fz53_flow5'
        )) AS has_error,
        count(*) FILTER (
            WHERE status = 'SUCCESS' AND job_name IN (
                'delta_citizen_criminal_liability_fz53_flow1', 
                'delta_citizen_criminal_liability_fz53_flow2', 
                'delta_citizen_criminal_liability_fz53_flow3', 
                'delta_citizen_criminal_liability_fz53_flow4', 
                'delta_citizen_criminal_liability_fz53_flow5'
            )
        ) = 5 AS all_success
    FROM public.etl_checkpoints
)
SELECT 
    'job_citizen_criminal_liability_fz53_delta' as job_name,
    CASE 
        WHEN has_error THEN 'ERROR'
        WHEN all_success THEN 'SUCCESS'
        ELSE 'ERROR'
    END AS status,
    current_timestamp AS record_created
FROM status_check;</sql>
    <variables_active>N</variables_active>
    <attributes/>
    <GUI>
      <xloc>896</xloc>
      <yloc>208</yloc>
    </GUI>
  </transform>
  <transform_error_handling>
  </transform_error_handling>
  <attributes/>
</pipeline>
