<?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 how to map a text file? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-map-a-text-file/m-p/2373633#M136335</link>
    <description>&lt;P&gt;Hello talend community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a file of type text contains heterogeneous information "bank statement" and I try to map in output in excel or a table in a database can help me ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the file I am trying to map&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:33:50 GMT</pubDate>
    <dc:creator>Chebli</dc:creator>
    <dc:date>2024-11-15T23:33:50Z</dc:date>
    <item>
      <title>how to map a text file?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-map-a-text-file/m-p/2373633#M136335</link>
      <description>&lt;P&gt;Hello talend community&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a file of type text contains heterogeneous information "bank statement" and I try to map in output in excel or a table in a database can help me ??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is the file I am trying to map&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:33:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-map-a-text-file/m-p/2373633#M136335</guid>
      <dc:creator>Chebli</dc:creator>
      <dc:date>2024-11-15T23:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to map a text file?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-map-a-text-file/m-p/2373634#M136336</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please take a look at the tFileinputPositional components.&lt;/P&gt;&lt;P&gt;https://help.talend.com/r/en-US/Cloud/studio-user-guide-cloud-api-services-platform/centralizing-file-positional-metadata &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000KDhvkAAD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139229iC6A711640B0C7D10/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000KDhvkAAD.png" alt="0695b00000KDhvkAAD.png" /&gt;&lt;/span&gt;This however will not solve the multi-line aspect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For that I'd suggest adding a tJavaFlex with:&lt;/P&gt;&lt;P&gt;[begin]&lt;/P&gt;&lt;P&gt;int id = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[main]&lt;/P&gt;&lt;P&gt;String firstCol = row2.Column0;&lt;/P&gt;&lt;P&gt;//i.e. it starts with 08/04 then it's a new line&amp;nbsp;if it is empty then it belongs to the previous line&lt;/P&gt;&lt;P&gt;if(firstCol != null &amp;amp;&amp;amp; firstCol.trim().length() &amp;gt; 4 ) {&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;id++;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;row3.id = id;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then using a tDenormalize component we can merge the fields:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000KDi30AAD.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149680i16CA3E014858DFC3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000KDi30AAD.png" alt="0695b00000KDi30AAD.png" /&gt;&lt;/span&gt;Here I don't add the ID column and merge without Delimiters the other columns.&lt;/P&gt;&lt;P&gt;Output looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000KDi3ZAAT.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146747iB33F076DB9B41512/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000KDi3ZAAT.png" alt="0695b00000KDi3ZAAT.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;  Balázs&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 09:06:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-map-a-text-file/m-p/2373634#M136336</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-11-02T09:06:12Z</dc:date>
    </item>
  </channel>
</rss>

