<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Data validation - Empty file Handling in Data Quality</title>
    <link>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281496#M3642</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In Talend, you can use tFileProperties to get the file properties, there is a field called size that populate the file size, if it is 0, means the file is empty. According to your description, a job design for example looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tFileFlist--iterate--tFileProperties--tJavaRow--runIf_1--&amp;gt;normal processing flow&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --runIf_2---&amp;gt;another processing if the file is empty&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on tJavaRow, check the file if it is empty and put the result to a global variable, for example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(input_row.size==0){ globalMap.put("isEmpty", true); }else{ globalMap.put("isEmpty", false); }&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;set the condition of runIf_1 as:&lt;BR /&gt;!(Boolean)globalMap.get("isEmpty")&lt;/P&gt;
&lt;P&gt;set the condition of runIf_2 as:&lt;BR /&gt;(Boolean)globalMap.get("isEmpty")&lt;/P&gt;
&lt;P&gt;Let us know if it is OK with you.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2017 06:52:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-09-28T06:52:39Z</dc:date>
    <item>
      <title>Data validation - Empty file Handling</title>
      <link>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281495#M3641</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to know how to implement some validation before processing a file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact, i have a file (csv) have contain header and i want to check if the file is empty(excluding the header) then process to tmap else die.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you advice please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;asadasing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2017 14:13:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281495#M3641</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2017-09-27T14:13:54Z</dc:date>
    </item>
    <item>
      <title>Re: Data validation - Empty file Handling</title>
      <link>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281496#M3642</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In Talend, you can use tFileProperties to get the file properties, there is a field called size that populate the file size, if it is 0, means the file is empty. According to your description, a job design for example looks like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tFileFlist--iterate--tFileProperties--tJavaRow--runIf_1--&amp;gt;normal processing flow&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --runIf_2---&amp;gt;another processing if the file is empty&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on tJavaRow, check the file if it is empty and put the result to a global variable, for example:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(input_row.size==0){ globalMap.put("isEmpty", true); }else{ globalMap.put("isEmpty", false); }&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;set the condition of runIf_1 as:&lt;BR /&gt;!(Boolean)globalMap.get("isEmpty")&lt;/P&gt;
&lt;P&gt;set the condition of runIf_2 as:&lt;BR /&gt;(Boolean)globalMap.get("isEmpty")&lt;/P&gt;
&lt;P&gt;Let us know if it is OK with you.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;
&lt;P&gt;Sabrina&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 06:52:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281496#M3642</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-09-28T06:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data validation - Empty file Handling</title>
      <link>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281497#M3643</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Thank you for your response, in tfileproperties, it does the size calculation in bytes.&lt;BR /&gt;Hence, i cannot check if file = 0 ; I have tried to check the flow with an empty file and it returns 2 and now my empty contain header, i guess the value will change.&lt;BR /&gt;&lt;BR /&gt;Can you advice please on how i can proceed?</description>
      <pubDate>Fri, 29 Sep 2017 13:15:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281497#M3643</guid>
      <dc:creator>RA6</dc:creator>
      <dc:date>2017-09-29T13:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Data validation - Empty file Handling</title>
      <link>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281498#M3644</link>
      <description>&lt;A href="https://community.qlik.com/s/profile/0053p000007LMIZAA4"&gt;@asadasing&lt;/A&gt; i think you can use tFileRowCount component.</description>
      <pubDate>Thu, 05 Oct 2017 18:24:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/Data-validation-Empty-file-Handling/m-p/2281498#M3644</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-05T18:24:40Z</dc:date>
    </item>
  </channel>
</rss>

