<?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 Extract specific data from text file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322708#M92625</link>
    <description>&lt;P&gt;I have a text file as follows:&lt;/P&gt;&lt;P&gt;----------------------------------------&lt;/P&gt;&lt;P&gt;ID: 00070&lt;/P&gt;&lt;P&gt;Date: 2022-06-17T09:34:50&lt;/P&gt;&lt;P&gt;Item is now available&lt;/P&gt;&lt;P&gt;Export : 0bf08b33 (2022-06-17T09:35:07) is here -&amp;gt; File D:\PATH\TO\FILE\LOCATION\&lt;/P&gt;&lt;P&gt;----------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attempting to export just the ID and the&lt;/P&gt;&lt;P&gt;D:\PATH\TO\FILE\LOCATION\ elements into a table/columns.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000UzUyhAAF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144636i33E48692FA42D226/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000UzUyhAAF.png" alt="0695b00000UzUyhAAF.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Using this workflow, I can extract the relevent rows (beginning 'ID....' &amp;amp; ' Export....')&lt;/P&gt;&lt;P&gt;How would I extract the specific data required from these rows?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Conkers&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 22:33:02 GMT</pubDate>
    <dc:creator>Conkers</dc:creator>
    <dc:date>2024-11-15T22:33:02Z</dc:date>
    <item>
      <title>Extract specific data from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322708#M92625</link>
      <description>&lt;P&gt;I have a text file as follows:&lt;/P&gt;&lt;P&gt;----------------------------------------&lt;/P&gt;&lt;P&gt;ID: 00070&lt;/P&gt;&lt;P&gt;Date: 2022-06-17T09:34:50&lt;/P&gt;&lt;P&gt;Item is now available&lt;/P&gt;&lt;P&gt;Export : 0bf08b33 (2022-06-17T09:35:07) is here -&amp;gt; File D:\PATH\TO\FILE\LOCATION\&lt;/P&gt;&lt;P&gt;----------------------------------------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm attempting to export just the ID and the&lt;/P&gt;&lt;P&gt;D:\PATH\TO\FILE\LOCATION\ elements into a table/columns.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000UzUyhAAF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144636i33E48692FA42D226/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000UzUyhAAF.png" alt="0695b00000UzUyhAAF.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Using this workflow, I can extract the relevent rows (beginning 'ID....' &amp;amp; ' Export....')&lt;/P&gt;&lt;P&gt;How would I extract the specific data required from these rows?&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Conkers&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:33:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322708#M92625</guid>
      <dc:creator>Conkers</dc:creator>
      <dc:date>2024-11-15T22:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extract specific data from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322709#M92626</link>
      <description>&lt;P&gt;An easy first change would be to use tFileInputDelimited component. Set the "Field separator" to be ": "  (remember the trailing space) and set up two columns. The first one being "RowType" which will hold your row identifier (ID, Date, Item is now available and Export). The second will be your data and will be called "Value". You may want 3rd and a 4th to hold minutes and seconds from the date row, but I guess that these are not necessary. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once you have this, you can link to a tMap and have a filter on your output table which holds something like this.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row1.RowType.equals("ID") || row1.RowType.equals("Export ")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This on its own will output this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID|00070&lt;/P&gt;&lt;P&gt;Export |0bf08b33 (2022-06-17T09:35:07) is here -&amp;gt; File D:\PATH\TO\FILE\LOCATION\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pipes above ("|") simply separate the columns. So you have two rows with two columns. Your first row holds your ID value already sorted, the second row has your Export value which will need some further processing. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To do that, further edit the tMap's output table's "Value" column. Replace the row1.Value expression with this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row1.Value!=&lt;B&gt;null&lt;/B&gt; &amp;amp;&amp;amp; row1.Value.indexOf("File ")&amp;gt;-1 ? row1.Value.substring(row1.Value.indexOf("File ")+5) : row1.Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you run the job again, you will get this.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID|00070&lt;/P&gt;&lt;P&gt;Export |D:\PATH\TO\FILE\LOCATION\&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've built a demo job to show you what it looks like. All of the settings I have described.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000UzWhsAAF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149151i48D185F40C96AB38/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000UzWhsAAF.png" alt="0695b00000UzWhsAAF.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 17:00:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322709#M92626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-15T17:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Extract specific data from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322710#M92627</link>
      <description>&lt;P&gt;I think the best would be to use the following component: https://help.talend.com/r/en-US/8.0/ms-delimited/ms-delimited-scenario &lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 11:53:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322710#M92627</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-19T11:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extract specific data from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322711#M92628</link>
      <description>&lt;P&gt;Good call @Balazs Gunics​. I completely forgot to consider the tFileOutputMSDelimited. Thanks for stepping in &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 23:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322711#M92628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-19T23:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Extract specific data from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322712#M92629</link>
      <description>&lt;P&gt;Thank you both, I will give tFileOutputMSDelimited a go!  (Sorry for not acknowledging sooner, couldn't log in to respond)&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-specific-data-from-text-file/m-p/2322712#M92629</guid>
      <dc:creator>Conkers</dc:creator>
      <dc:date>2022-09-26T08:42:54Z</dc:date>
    </item>
  </channel>
</rss>

