<?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 validate data in a csv file before insertion in database in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266780#M45883</link>
    <description>Hello, 
&lt;BR /&gt;here my needs : 
&lt;BR /&gt;I have a csv file containing data. I want to insert or update this data in a postgresql database but I need to validate some condition before : 
&lt;BR /&gt;the column number 
&lt;BR /&gt;the column names 
&lt;BR /&gt;the corresponding column type 
&lt;BR /&gt;at least 1 line of data 
&lt;BR /&gt;If one of this conditions are missing. I have to stop the job. 
&lt;BR /&gt;So I create a sub job : 
&lt;BR /&gt;tFileInputDelimited link to a tSchemaComplianceCheck 
&lt;BR /&gt;the ifileInputDelimited Schema is a generic schema corresponding to my csvFile 
&lt;BR /&gt;I my main job : 
&lt;BR /&gt;I link a tFileInpuDelimited to my sub job. 
&lt;BR /&gt;On error I send a tDie. 
&lt;BR /&gt;On success I use a tMap to send row to my database. 
&lt;BR /&gt;On reject from my database I use another tmap to send line and errors in a reject file. 
&lt;BR /&gt;Here my problems : 
&lt;BR /&gt;my sub job send error only where column type are wrong. 
&lt;BR /&gt;if a csv file line contains least data that it should, empty data are inserted instead of genereting a reject 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks for your help.</description>
    <pubDate>Sat, 16 Nov 2024 13:11:12 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:11:12Z</dc:date>
    <item>
      <title>validate data in a csv file before insertion in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266780#M45883</link>
      <description>Hello, 
&lt;BR /&gt;here my needs : 
&lt;BR /&gt;I have a csv file containing data. I want to insert or update this data in a postgresql database but I need to validate some condition before : 
&lt;BR /&gt;the column number 
&lt;BR /&gt;the column names 
&lt;BR /&gt;the corresponding column type 
&lt;BR /&gt;at least 1 line of data 
&lt;BR /&gt;If one of this conditions are missing. I have to stop the job. 
&lt;BR /&gt;So I create a sub job : 
&lt;BR /&gt;tFileInputDelimited link to a tSchemaComplianceCheck 
&lt;BR /&gt;the ifileInputDelimited Schema is a generic schema corresponding to my csvFile 
&lt;BR /&gt;I my main job : 
&lt;BR /&gt;I link a tFileInpuDelimited to my sub job. 
&lt;BR /&gt;On error I send a tDie. 
&lt;BR /&gt;On success I use a tMap to send row to my database. 
&lt;BR /&gt;On reject from my database I use another tmap to send line and errors in a reject file. 
&lt;BR /&gt;Here my problems : 
&lt;BR /&gt;my sub job send error only where column type are wrong. 
&lt;BR /&gt;if a csv file line contains least data that it should, empty data are inserted instead of genereting a reject 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks for your help.</description>
      <pubDate>Sat, 16 Nov 2024 13:11:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266780#M45883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: validate data in a csv file before insertion in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266781#M45884</link>
      <description>I think what you want is to check the advanced option on the tFileInputDelimited "Check each row structure against schema". If not, put up a screenprint with more detail of exactly what the problem is.</description>
      <pubDate>Wed, 08 Dec 2010 22:25:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266781#M45884</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2010-12-08T22:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: validate data in a csv file before insertion in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266782#M45885</link>
      <description>Indeed, that is what I was looking for.
&lt;BR /&gt;Thank you.
&lt;BR /&gt;I have another question :
&lt;BR /&gt;How could I now the current line number when I'm reading a file ?
&lt;BR /&gt;I need It to put it in a reject file when my filterRow reject data.</description>
      <pubDate>Fri, 10 Dec 2010 08:47:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266782#M45885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-12-10T08:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: validate data in a csv file before insertion in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266783#M45886</link>
      <description>Best would probably be to have a tJavaRow or tMap after tFileInputDelimited, in which you can add a column with the expression Numeric.sequence("RowCount",1,1).</description>
      <pubDate>Sun, 12 Dec 2010 22:07:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/validate-data-in-a-csv-file-before-insertion-in-database/m-p/2266783#M45886</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2010-12-12T22:07:04Z</dc:date>
    </item>
  </channel>
</rss>

