<?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 [resolved] How to log all records in csv file that generate exception in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-log-all-records-in-csv-file-that-generate/m-p/2300348#M72582</link>
    <description>Hello Team, 
&lt;BR /&gt; 
&lt;BR /&gt;I am trying to read csv file and store its content in a database table. 
&lt;BR /&gt;If a line in csv file is not properly formed, it throws an exception. I want to log all these lines in log file and process all the valid records. 
&lt;BR /&gt;Please see attached a snapshot of what I have so far. I use FileInputDelimited to read file content, then I process it line by line using flowToIterate and FixedFlowInput, passing data to tMap and then to database. 
&lt;BR /&gt;To log, I use tLogCatcher component attached to tLogRow. tLogCatcher is configured to catch java exceptions. 
&lt;BR /&gt;I have two problems here. 
&lt;BR /&gt;1. Assuming I have an invalid records in my csv file, error log file will not be created unless I check "Die on error" on the very first component (tFileInputDelimited). When I check "Die on error", log file containing only one error will be created and execution of the job will stop - not the desired scenario. I need to just log this record and keep processing the rest of the file. 
&lt;BR /&gt;2. Even when this one record is created in log file, it does not contain the line from csv file. It only contains java error message. I need to have entire line from csv file that caused this error. I don't see how I can configure tLogRow and tLogCatcher with different schema to log what I need. I can probably get away with tJava components but is this a right way? 
&lt;BR /&gt; 
&lt;BR /&gt;Your help would be very much appreciated. 
&lt;BR /&gt; 
&lt;BR /&gt;Svetlana 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MFtw.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144787i146099532F658F3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MFtw.png" alt="0683p000009MFtw.png" /&gt;&lt;/span&gt;</description>
    <pubDate>Sat, 16 Nov 2024 10:12:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T10:12:32Z</dc:date>
    <item>
      <title>[resolved] How to log all records in csv file that generate exception</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-log-all-records-in-csv-file-that-generate/m-p/2300348#M72582</link>
      <description>Hello Team, 
&lt;BR /&gt; 
&lt;BR /&gt;I am trying to read csv file and store its content in a database table. 
&lt;BR /&gt;If a line in csv file is not properly formed, it throws an exception. I want to log all these lines in log file and process all the valid records. 
&lt;BR /&gt;Please see attached a snapshot of what I have so far. I use FileInputDelimited to read file content, then I process it line by line using flowToIterate and FixedFlowInput, passing data to tMap and then to database. 
&lt;BR /&gt;To log, I use tLogCatcher component attached to tLogRow. tLogCatcher is configured to catch java exceptions. 
&lt;BR /&gt;I have two problems here. 
&lt;BR /&gt;1. Assuming I have an invalid records in my csv file, error log file will not be created unless I check "Die on error" on the very first component (tFileInputDelimited). When I check "Die on error", log file containing only one error will be created and execution of the job will stop - not the desired scenario. I need to just log this record and keep processing the rest of the file. 
&lt;BR /&gt;2. Even when this one record is created in log file, it does not contain the line from csv file. It only contains java error message. I need to have entire line from csv file that caused this error. I don't see how I can configure tLogRow and tLogCatcher with different schema to log what I need. I can probably get away with tJava components but is this a right way? 
&lt;BR /&gt; 
&lt;BR /&gt;Your help would be very much appreciated. 
&lt;BR /&gt; 
&lt;BR /&gt;Svetlana 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MFtw.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144787i146099532F658F3D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MFtw.png" alt="0683p000009MFtw.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Sat, 16 Nov 2024 10:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-log-all-records-in-csv-file-that-generate/m-p/2300348#M72582</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T10:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to log all records in csv file that generate exception</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-log-all-records-in-csv-file-that-generate/m-p/2300349#M72583</link>
      <description>Hi,&lt;BR /&gt;We see that this topic has been set as resolved. Feel free to let us know if this issue still repro on your side.&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Tue, 13 Dec 2016 03:45:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-log-all-records-in-csv-file-that-generate/m-p/2300349#M72583</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-13T03:45:48Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] How to log all records in csv file that generate exception</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-log-all-records-in-csv-file-that-generate/m-p/2300350#M72584</link>
      <description>Hi Svetlana,
&lt;BR /&gt;I am currently developing an ETL job that has the exact requirement that you have mentioned in your original post.
&lt;BR /&gt;I am eager to know how you managed to log the rows.
&lt;BR /&gt;Can you please let me know?
&lt;BR /&gt;Regards,
&lt;BR /&gt;Ketan</description>
      <pubDate>Tue, 13 Dec 2016 09:16:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-How-to-log-all-records-in-csv-file-that-generate/m-p/2300350#M72584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-13T09:16:46Z</dc:date>
    </item>
  </channel>
</rss>

