<?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: CSV mapping failure in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291016#M64243</link>
    <description>&lt;P&gt;Try to replace " by \" when it appears in data not just as a field enclosure&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2019 13:15:43 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2019-05-03T13:15:43Z</dc:date>
    <item>
      <title>CSV mapping failure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291014#M64241</link>
      <description>&lt;P&gt;Hi Talends,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have an issue with loading a correct mapped csv file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Input CSV (with header) is like:&lt;/P&gt;&lt;P&gt;"field1";"field2";"field3";"field4"&lt;/P&gt;&lt;P&gt;"ABC";"123";"DEF\r\n&lt;/P&gt;&lt;P&gt;456\r\n&lt;/P&gt;&lt;P&gt;GHI";"JKL789"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output (in Salesforce Text fields) should be like:&lt;/P&gt;&lt;P&gt;field1: ABC&lt;/P&gt;&lt;P&gt;field2: 123&lt;/P&gt;&lt;P&gt;field3:&lt;/P&gt;&lt;P&gt;DEF&lt;/P&gt;&lt;P&gt;456&lt;/P&gt;&lt;P&gt;GHI&lt;/P&gt;&lt;P&gt;field4: JKL789&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it is actually like:&lt;/P&gt;&lt;P&gt;First data set:&lt;/P&gt;&lt;P&gt;field1: ABC&lt;/P&gt;&lt;P&gt;field2:&amp;nbsp;123&lt;/P&gt;&lt;P&gt;field3:&amp;nbsp;DEF&lt;/P&gt;&lt;P&gt;field4: NULL&lt;/P&gt;&lt;P&gt;Second data set:&lt;/P&gt;&lt;P&gt;field1: 456&lt;/P&gt;&lt;P&gt;field2: NULL&lt;/P&gt;&lt;P&gt;field3: NULL&lt;/P&gt;&lt;P&gt;field4: NULL&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rough configuration is like tFileInputDelimited--&amp;gt;tMap--&amp;gt;tSalesforceBulkExec&lt;/P&gt;&lt;P&gt;tFileInputDelimited settings are:&lt;/P&gt;&lt;P&gt;CSV Row Seperator: CRLF("\r\n")&lt;/P&gt;&lt;P&gt;Field Seperator: ";"&lt;/P&gt;&lt;P&gt;Escape Char: """&lt;/P&gt;&lt;P&gt;Text enclosure: """&lt;/P&gt;&lt;P&gt;Header: 1&lt;/P&gt;&lt;P&gt;Skip empty rows: true&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Right now I have no clue what is possibly wrong.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For any help I would be very grateful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Fred&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 09:25:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291014#M64241</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-03T09:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: CSV mapping failure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291015#M64242</link>
      <description>&lt;P&gt;Hi again,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recognized an possible issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not all dataset have that problem. So the CRLF might not be the problem.&lt;/P&gt;
&lt;P&gt;The datasets, which aren't mapped properly has "" within the field3&lt;/P&gt;
&lt;P&gt;(like:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"DEF\r\n&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;&lt;/STRONG&gt;456&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;"&lt;/FONT&gt;&lt;/STRONG&gt;\r\n&lt;/P&gt;
&lt;P&gt;GHI")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That might cause the problem. Nevertheless I would think the marked field seperator ";" indicates the individual fields and is not influenced by the text enclosure.&lt;/P&gt;
&lt;P&gt;How can I mitigate that problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards Fred&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 11:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291015#M64242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-03T11:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: CSV mapping failure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291016#M64243</link>
      <description>&lt;P&gt;Try to replace " by \" when it appears in data not just as a field enclosure&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 13:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291016#M64243</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-05-03T13:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: CSV mapping failure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291017#M64244</link>
      <description>&lt;P&gt;Hi TRF&lt;/P&gt;
&lt;P&gt;thanks for reply!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I configured the field in the tMap out expression for the mentioned field like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rowX,field3.replace(""", "\"")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I get a compile Error ( The method replace(chat,char) in the type String is not applicable for the arguments (String) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did I understand you right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Fred&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 14:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291017#M64244</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-03T14:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: CSV mapping failure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291018#M64245</link>
      <description>&lt;P&gt;replace is for char, not for string.&lt;/P&gt;
&lt;P&gt;As soon as you have more than 1 char you need to use replaceAll such as&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;rowX,field3.replaceAll("\"", "\\\"")&lt;/PRE&gt;
&lt;P&gt;You need to try, I can't actually on my side&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 14:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291018#M64245</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-05-03T14:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: CSV mapping failure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291019#M64246</link>
      <description>&lt;P&gt;Ok, thanks for the hint!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I did it like you suggested:&lt;/P&gt;
&lt;PRE&gt;rowX,field3.replaceAll("\"", "\\\"")&lt;/PRE&gt;
&lt;P&gt;Unfortunatly I get now a NullPointerExeption in the tMap component.&lt;/P&gt;
&lt;P&gt;(java.lang.NullPointerException:null1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas left?&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 15:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291019#M64246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-03T15:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: CSV mapping failure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291020#M64247</link>
      <description>&lt;P&gt;Hello, I have still no success.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried several combination of configurations in the tFileDelimited compenent (Escape char, Text enclosure, etc.) and with the replace funtion.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is there any other solution? E.g. is it possible to use more than one char for the field seperator (In this case: "";"" instead of ";").&lt;/P&gt; 
&lt;P&gt;This would maybe solve it.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for your suggestions.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regrads&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 11:26:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291020#M64247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-06T11:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: CSV mapping failure</title>
      <link>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291021#M64248</link>
      <description>&lt;P&gt;The only solution that works for me was to remove the " frome the inputfile.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for replies.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Fred&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 16:06:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/CSV-mapping-failure/m-p/2291021#M64248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T16:06:20Z</dc:date>
    </item>
  </channel>
</rss>

