<?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 tFileInputDelimited type mismatch error in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-type-mismatch-error/m-p/2370093#M133175</link>
    <description>When I use tFileInputDelimited I am getting a data type error for input fields that are not strings. In my case a long and a date. 
&lt;BR /&gt;I get the following errors: 
&lt;BR /&gt;Exception in thread "Thread-1" java.lang.Error: Unresolved compilation problems: 
&lt;BR /&gt; Type mismatch: cannot convert from String to Date 
&lt;BR /&gt; Type mismatch: cannot convert from String to long 
&lt;BR /&gt;Here is a sample line from CSV: 6545646S2A7;TEST2222CYYL0000;28-04-2010;1664486487;Very_very_long_string 
&lt;BR /&gt;I looked at the offending lines in the code and I noticed the following: 
&lt;BR /&gt;if (temp_tFileInputDelimited_1.length() &amp;gt; 0) { 
&lt;BR /&gt; row10.CRC = ParserUtils.parseTo_long(temp_tFileInputDelimited_1); 
&lt;BR /&gt;} else { 
&lt;BR /&gt; row10.CRC = ""; 
&lt;BR /&gt;} 
&lt;BR /&gt;if (temp_tFileInputDelimited_1.length() &amp;gt; 0) { 
&lt;BR /&gt; row10.date = ParserUtils.parseTo_Date(temp_tFileInputDelimited_1, "dd-MM-yyyy"); 
&lt;BR /&gt;} else { 
&lt;BR /&gt; row10.date = ""; 
&lt;BR /&gt;} 
&lt;BR /&gt;If the length is 0 for each of these, shouldn't the values be set to NULL for a date and 0 or NULL for a long rather than "" - (an empty string)? 
&lt;BR /&gt;I realize that I can just set these to strings and then use a tJavaRow or tConvert to convert the strings back into the long and the date, but that seems cumbersome. 
&lt;BR /&gt;Any thoughts? 
&lt;BR /&gt;I am using TOS 4.0.1/Java on Windows</description>
    <pubDate>Sat, 16 Nov 2024 13:26:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:26:42Z</dc:date>
    <item>
      <title>tFileInputDelimited type mismatch error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-type-mismatch-error/m-p/2370093#M133175</link>
      <description>When I use tFileInputDelimited I am getting a data type error for input fields that are not strings. In my case a long and a date. 
&lt;BR /&gt;I get the following errors: 
&lt;BR /&gt;Exception in thread "Thread-1" java.lang.Error: Unresolved compilation problems: 
&lt;BR /&gt; Type mismatch: cannot convert from String to Date 
&lt;BR /&gt; Type mismatch: cannot convert from String to long 
&lt;BR /&gt;Here is a sample line from CSV: 6545646S2A7;TEST2222CYYL0000;28-04-2010;1664486487;Very_very_long_string 
&lt;BR /&gt;I looked at the offending lines in the code and I noticed the following: 
&lt;BR /&gt;if (temp_tFileInputDelimited_1.length() &amp;gt; 0) { 
&lt;BR /&gt; row10.CRC = ParserUtils.parseTo_long(temp_tFileInputDelimited_1); 
&lt;BR /&gt;} else { 
&lt;BR /&gt; row10.CRC = ""; 
&lt;BR /&gt;} 
&lt;BR /&gt;if (temp_tFileInputDelimited_1.length() &amp;gt; 0) { 
&lt;BR /&gt; row10.date = ParserUtils.parseTo_Date(temp_tFileInputDelimited_1, "dd-MM-yyyy"); 
&lt;BR /&gt;} else { 
&lt;BR /&gt; row10.date = ""; 
&lt;BR /&gt;} 
&lt;BR /&gt;If the length is 0 for each of these, shouldn't the values be set to NULL for a date and 0 or NULL for a long rather than "" - (an empty string)? 
&lt;BR /&gt;I realize that I can just set these to strings and then use a tJavaRow or tConvert to convert the strings back into the long and the date, but that seems cumbersome. 
&lt;BR /&gt;Any thoughts? 
&lt;BR /&gt;I am using TOS 4.0.1/Java on Windows</description>
      <pubDate>Sat, 16 Nov 2024 13:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-type-mismatch-error/m-p/2370093#M133175</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: tFileInputDelimited type mismatch error</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-type-mismatch-error/m-p/2370094#M133176</link>
      <description>Submitted as bug 0012951</description>
      <pubDate>Sat, 01 May 2010 19:38:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tFileInputDelimited-type-mismatch-error/m-p/2370094#M133176</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-01T19:38:16Z</dc:date>
    </item>
  </channel>
</rss>

