<?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: Extract strings from log file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216007#M12202</link>
    <description>&lt;P&gt;You need to set the output schema in the tJavaFlex you are using to get your ArrayList data into columns. You use the columns you create in the schema in the Main Code. This documentation shows how this is done....&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://help.talend.com/reader/NFGUc8bs6NnLij6GaHwLEg/Tf6KbwwwCnrhU2sWL4Dv6A" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/NFGUc8bs6NnLij6GaHwLEg/Tf6KbwwwCnrhU2sWL4Dv6A&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Mar 2020 16:41:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-03-04T16:41:39Z</dc:date>
    <item>
      <title>Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215984#M12179</link>
      <description>&lt;P&gt;Hi experts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have got log file like below from which I want to extract Applicant ID, Agent Applicant ID and Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OES Admission Application Process Log at 2020-02-18 09:12:34.733&lt;/P&gt;&lt;P&gt;***** START OF LOGS *****&lt;/P&gt;&lt;P&gt;Application Name:ERWGERG Application ID: A-5562 Cal Applicant ID: 431234 CRM Applicant ID: C-4357623&lt;BR /&gt;[INFO] - New Applicant ID 431234 created for Agent Applicant ID 0035Q000002hzDmQAL.&lt;BR /&gt;Preference 1 for application 123 has been successfully loaded into Applicant Portal.&lt;BR /&gt;No document has been inserted as no information has been provided.&lt;BR /&gt;Applicant Application data has been inserted, even though error(s) did occur. The data that caused the error has been ignored or the error has been ignored.&lt;/P&gt;&lt;P&gt;[ERROR] - Field &amp;lt;SCNDRY&amp;gt;&amp;lt;COMPLETION_YR&amp;gt; that has been defined as mandatory by the institution has not been supplied.&lt;BR /&gt;Secondary data supplied has been matched to data that already exists for the applicant therefore the data has been ignored.&lt;BR /&gt;Tertiary data supplied has been matched to data that already exists for the applicant therefore the data has been ignored.&lt;BR /&gt;Either Planned Date or Date Achieved must be entered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the best way to extract and if regex needs to be written, what it should be?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Harshal.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:10:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215984#M12179</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2024-11-16T03:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215985#M12180</link>
      <description>Hi 
&lt;BR /&gt;The format of log messages are always the same? and what Error string do you want to extract?
&lt;BR /&gt;
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 26 Feb 2020 06:42:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215985#M12180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-26T06:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215986#M12181</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp; The format will remain same but I will have multiple messages in same log file like below:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Admission Application Process Log at 2020-02-26 16:34:06.124&lt;/P&gt; 
&lt;P&gt;***** START OF LOGS *****&lt;/P&gt; 
&lt;P&gt;Application Name: FRT450as TEST Application ID: A-445664 Callista Applicant ID: 1234567 CRM Applicant ID: C-453234&lt;BR /&gt;[INFO] - New Applicant ID1234567 created for Agent Applicant ID 0035P000002lpE3QAI.&lt;BR /&gt;Preference 1 for application 123 has been successfully loaded into Applicant Portal.&lt;BR /&gt;No document has been inserted as no information has been provided.&lt;/P&gt; 
&lt;P&gt;[ERROR] - Field &amp;lt;SCNDRY&amp;gt;&amp;lt;COMPLETION_YR&amp;gt; that has been defined as mandatory by the institution has not been supplied.&lt;BR /&gt;Only one of Institution Code and Institution name is required.&lt;BR /&gt;Your application is incomplete. You must provide at least one qualification for secondary education, tertiary education, other qualification or work experience before submitting&lt;BR /&gt;Applicant Application data has not been inserted as an error has occurred.&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;Application Name: FREF23 TEST Application ID: A-345656 Callista Applicant ID: 2345678 CRM Applicant ID: C-A0534546&lt;BR /&gt;[INFO] - New Applicant2345678 created for Agent Applicant ID 0035O000002lowAWAQ.&lt;BR /&gt;Preference 1 for application 123 has been successfully loaded into Applicant Portal.&lt;BR /&gt;No document has been inserted as no information has been provided.&lt;/P&gt; 
&lt;P&gt;[ERROR] - Field &amp;lt;SCNDRY&amp;gt;&amp;lt;COMPLETION_YR&amp;gt; that has been defined as mandatory by the institution has not been supplied.&lt;BR /&gt;Only one of Institution Code and Institution name is required.&lt;BR /&gt;Your application is incomplete. You must provide at least one qualification for secondary education, tertiary education, other qualification or work experience before submitting&lt;BR /&gt;Applicant Application data has not been inserted as an error has occurred.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So I want to capture anything after [ERROR] and capture it.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 06:55:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215986#M12181</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-02-26T06:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215987#M12182</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/null"&gt;@rhall&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp; Could you please reply?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 20:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215987#M12182</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-02-26T20:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215988#M12183</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp; Could you pls respond to this?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 00:36:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215988#M12183</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-02-27T00:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215989#M12184</link>
      <description>&lt;P&gt;The easiest way is to standard Java String methods (&lt;A href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.oracle.com/javase/7/docs/api/java/lang/String.html&lt;/A&gt;). You know the words that precede the data you want. So you need to find their positions in the String (using something like "indexOf()") then you will need to look for the first space character after your String has started. The easiest way to do this will be to use code similar to this (assuming the text is in row1.body)....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;String startOfApplicantId = row1.body.subString(row1.body.indexOf("&lt;SPAN&gt;Application ID:"));&lt;BR /&gt;String ApplicantId = startOfApplicantId.trim().subString(0,startOfApplicantId.trim().indexOf(" "));&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above code was written off the top of my head, so may need tweaking. But that is essentially what you need to do.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 16:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215989#M12184</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T16:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215990#M12185</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I wrote below code and achieved it.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;String str = row18.line;&lt;/P&gt; 
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p3"&gt;&lt;SPAN class="s1"&gt;String strFind = &lt;/SPAN&gt;"Callista Applicant ID:"&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p3"&gt;&lt;SPAN class="s1"&gt;String strFind1= &lt;/SPAN&gt;"for Agent Applicant ID"&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;String strFind2= &lt;SPAN class="s2"&gt;"[ERROR] -"&lt;/SPAN&gt;;&lt;/P&gt; 
&lt;P class="p3"&gt;&lt;SPAN class="s1"&gt;String strFind3= &lt;/SPAN&gt;"Application Name:"&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt; count = 0, fromIndex = 0;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt; count1 =0, fromIndex1= 0;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt; count2 =0, fromIndex2= 0;&lt;/P&gt; 
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;&lt;/SPAN&gt; ((fromIndex = str.indexOf(strFind, fromIndex)) != -1 ){&lt;/P&gt; 
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;System.out.println("Found at index: " + fromIndex);&lt;/P&gt; 
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;String str1 = str.substring(strFind.length() + fromIndex, strFind.length() + fromIndex + 9);&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;str1 = str1.trim();&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;System.out.println(&lt;SPAN class="s2"&gt;"Callista applicant ID "&lt;/SPAN&gt; + str1);&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;count++;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;fromIndex++;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt; 
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;&lt;/SPAN&gt; ((fromIndex1 = str.indexOf(strFind1, fromIndex1)) != -1 ){&lt;/P&gt; 
&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;System.out.println("Found at index: " + fromIndex1);&lt;/P&gt; 
&lt;P class="p2"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;String str2 = str.substring(strFind1.length() + fromIndex1, strFind1.length() + fromIndex1 + 19);&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;str2 = str2.trim();&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;System.out.println(&lt;SPAN class="s2"&gt;"Account ID "&lt;/SPAN&gt; + str2);&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;count1++;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;fromIndex1++;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;However, I want to store value of str1 and str2 in db and do further processing. How cna I do that?&lt;/P&gt;</description>
      <pubDate>Sun, 01 Mar 2020 20:48:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215990#M12185</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-03-01T20:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215991#M12186</link>
      <description>Do you write these code on tJavaRow or tJavaFlex component? We usually define context variables and store the value of str1 and str2, and then these context variable can be used later on other components. 
&lt;BR /&gt;
&lt;BR /&gt;Regards
&lt;BR /&gt;Shong
&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Mar 2020 03:43:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215991#M12186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-02T03:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215992#M12187</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;I know you can store in context variable.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have got multiple values (multiple applicant ID, multiple Account Id) to be captured from log file. Then how do I capture in tJava like this below&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Applicant Id, Account ID&lt;/P&gt; 
&lt;P&gt;123,345&lt;/P&gt; 
&lt;P&gt;234,677&lt;/P&gt; 
&lt;P&gt;456,466&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;and push it into DB?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 04:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215992#M12187</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-03-02T04:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215993#M12188</link>
      <description>As I mentioned, I usually use context variable to store the value. Then, i will use tFixedFlowInput to generate the data flow and insert them into DB. &lt;BR /&gt;What is the value of str1 and str2 you can get now? Show me the value.&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Mar 2020 06:03:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215993#M12188</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-02T06:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215994#M12189</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/00539000004XsnJAAS"&gt;@shong&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The values I am getting are like this from tjavarow using println (using arraylist to output):&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;Applicant_id: [2084506, 2084507, 2084508, 2084509, 2084510]&lt;/P&gt; 
&lt;P class="p1"&gt;Account_Id: [0035O000002lpB3QAI, 0035O000002lowPQAQ, 0035O000002lpBrQAI, 0035O000002lpCaQAI, 0035O000002lpD9QAI]&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 06:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215994#M12189</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-03-02T06:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215995#M12190</link>
      <description>&lt;P&gt;If you are storing these values in ArrayLists, you are almost there. I assume that you have used a tJavaFlex. I imagine you created the ArrayLists in the Start Code section and populated them in the Main Code section. To release these values to a row so that you can update your DB, you can either alter your code to release these values in Main Code section. Simply create the columns you want to output and assign the values to those columns instead of adding them to ArrayLists. Alternatively, if you need to assign the values to ArrayLists, you can read those ArrayLists using another tJavaFlex. Consider the Start Code as the area to open your loop. Maybe like this....&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;//Assuming your ArrayList is called myArrayList
for(int i = 0; i&amp;lt;myArrayList.size(); i++){
&lt;/PRE&gt; 
&lt;P&gt;Then in the Main Code extract the values in the myArrayList using the value of "i" and assign them to output columns.&lt;/P&gt; 
&lt;P&gt;You have to remember that you need to close your for loop with the following code in the End Code section....&lt;/P&gt; 
&lt;PRE&gt;}&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Mar 2020 10:54:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215995#M12190</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-02T10:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215996#M12191</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp; Could you please share job design or something which can show me how would you accept it as column and store? That would be really helpful because that's where I am stuck and not able to proceed.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 18:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215996#M12191</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-03-02T18:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215997#M12192</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp; I am suing tjavarow and below is my code:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;String str = row18.line;&lt;/P&gt; 
&lt;P class="p2"&gt;&lt;SPAN class="s1"&gt;String strFind = &lt;/SPAN&gt;"Callista Applicant ID:"&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p2"&gt;&lt;SPAN class="s1"&gt;String strFind1= &lt;/SPAN&gt;"for Agent Applicant ID"&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;String strFind2= &lt;SPAN class="s2"&gt;"[ERROR] -"&lt;/SPAN&gt;;&lt;/P&gt; 
&lt;P class="p2"&gt;&lt;SPAN class="s1"&gt;String strFind3= &lt;/SPAN&gt;"Application Name:"&lt;SPAN class="s1"&gt;;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt; count = 0, fromIndex = 0;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt; count1 =0, fromIndex1= 0;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;int&lt;/STRONG&gt;&lt;/SPAN&gt; count2 =0, fromIndex2= 0;&lt;/P&gt; 
&lt;P class="p1"&gt;List&amp;lt;String&amp;gt; results1 = &lt;SPAN class="s3"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt; java.util.ArrayList&amp;lt;String&amp;gt;();&lt;/P&gt; 
&lt;P class="p1"&gt;List&amp;lt;String&amp;gt; results2 = &lt;SPAN class="s3"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt; java.util.ArrayList&amp;lt;String&amp;gt;();&lt;/P&gt; 
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;&lt;/SPAN&gt; ((fromIndex = str.indexOf(strFind, fromIndex)) != -1 ){&lt;/P&gt; 
&lt;P class="p4"&gt;// System.out.println("Found at index: " + fromIndex);&lt;/P&gt; 
&lt;P class="p1"&gt;String str1 = str.substring(strFind.length() + fromIndex, strFind.length() + fromIndex + 9);&lt;/P&gt; 
&lt;P class="p1"&gt;str1 = str1.trim();&lt;/P&gt; 
&lt;P class="p4"&gt;//System.out.println("Callista applicant ID " + str1);&lt;/P&gt; 
&lt;P class="p4"&gt;//globalMap.put("Applicant_Id",str1);&lt;/P&gt; 
&lt;P class="p4"&gt;//System.out.println("Applicant_Id: "+((String)globalMap.get("Applicant_Id")));&lt;/P&gt; 
&lt;P class="p1"&gt;results1.add(str1);&lt;/P&gt; 
&lt;P class="p4"&gt;//results[count] = globalMap.get("Applicant_Id");&lt;/P&gt; 
&lt;P class="p1"&gt;count++;&lt;/P&gt; 
&lt;P class="p1"&gt;fromIndex++;&lt;/P&gt; 
&lt;P class="p1"&gt;}&lt;/P&gt; 
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;&lt;SPAN class="s3"&gt;&lt;STRONG&gt;while&lt;/STRONG&gt;&lt;/SPAN&gt; ((fromIndex1 = str.indexOf(strFind1, fromIndex1)) != -1 ){&lt;/P&gt; 
&lt;P class="p4"&gt;// System.out.println("Found at index: " + fromIndex1);&lt;/P&gt; 
&lt;P class="p1"&gt;String str2 = str.substring(strFind1.length() + fromIndex1, strFind1.length() + fromIndex1 + 19);&lt;/P&gt; 
&lt;P class="p1"&gt;str2 = str2.trim();&lt;/P&gt; 
&lt;P class="p1"&gt;results2.add(str2);&lt;/P&gt; 
&lt;P class="p4"&gt;//System.out.println("Account ID " + str2);&lt;/P&gt; 
&lt;P class="p4"&gt;//globalMap.put("Account_Id",str2);&lt;/P&gt; 
&lt;P class="p4"&gt;//System.out.println("Account_Id: "+((String)globalMap.get("Account_Id")));&lt;/P&gt; 
&lt;P class="p4"&gt;//results[count1] = ","+globalMap.get("Account_Id");&lt;/P&gt; 
&lt;P class="p1"&gt;count1++;&lt;/P&gt; 
&lt;P class="p1"&gt;fromIndex1++;&lt;/P&gt; 
&lt;P class="p1"&gt;}&lt;/P&gt; 
&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p4"&gt;//globalMap.put("Applicant_id",results1);&lt;/P&gt; 
&lt;P class="p4"&gt;//globalMap.put("Account_id",results2);&lt;/P&gt; 
&lt;P class="p1"&gt;String[] arr1 = &lt;SPAN class="s3"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt; String[results1.size()];&lt;/P&gt; 
&lt;P class="p1"&gt;arr1 = results1.toArray(arr1);&lt;/P&gt; 
&lt;P class="p4"&gt;//globalMap.put("App_id",arr1);&lt;/P&gt; 
&lt;P class="p4"&gt;//System.out.println("App_Id: "+((String)globalMap.get("App_id")));&lt;/P&gt; 
&lt;P class="p1"&gt;System.out.println(&lt;SPAN class="s2"&gt;"Applicant_id: "&lt;/SPAN&gt;+ java.util.Arrays.toString(arr1));&lt;/P&gt; 
&lt;P class="p3"&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P class="p1"&gt;String[] arr2 = &lt;SPAN class="s3"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt; String[results2.size()];&lt;/P&gt; 
&lt;P class="p1"&gt;arr2 = results2.toArray(arr2);&lt;/P&gt; 
&lt;P class="p4"&gt;// globalMap.put("Acc_id",arr2);&lt;/P&gt; 
&lt;P class="p4"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;//System.out.println("Acc_id: "+((String)globalMap.get("Acc_id")));&lt;/P&gt; 
&lt;P class="p1"&gt;System.out.println(&lt;SPAN class="s2"&gt;"Account_Id: "&lt;/SPAN&gt;+java.util.Arrays.toString(arr2));&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 18:33:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215997#M12192</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-03-02T18:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215998#M12193</link>
      <description>&lt;P&gt;Look at this post (&lt;A href="https://community.qlik.com/s/feed/0D73p000004k5mVCAQ#M112597" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/Dynamic-column-export-with-order/m-p/205749/highlight/true#M112597&lt;/A&gt;). The tJavaFlex_2 section covers what you want to do.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 21:37:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215998#M12193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-02T21:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215999#M12194</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&amp;nbsp; I am using tjavarow. Does it mean I will have to change my code to accomodate according to tJavaflex and end both the loops in end code?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 03:27:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2215999#M12194</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-03-03T03:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216000#M12195</link>
      <description>&lt;P&gt;When you are reading the data, you can do that in a tJavaFlex without the Loop starting in the start code and ending in the end code. The "loop" is controlled by the rows of data coming in (your log file). You will need to save the data (the ArrayLists) using the globalMap in the end code though. When reading the data in, it should work exactly the same way as the example I sent you. However, you will probably want to use a for loop instead of an iterator with a while loop. This is because you will want to retrieve data from two ArrayLists. I'm assuming that they will have the same number of elements.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 09:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216000#M12195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-03T09:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216001#M12196</link>
      <description>&lt;P&gt;Yes that's right both will have same number of elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But how do I write for loop for both together? What I don't get is how do you create two columns in first component and assign the values there using for loop? If you could help here, would really appreciate. I am literally stuck here since many days.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 09:41:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216001#M12196</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-03-03T09:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216002#M12197</link>
      <description>&lt;BR /&gt;In my case I must use while or some loop to find multiple occurrences of same attribute. If you see my pasted code you will know why I’m using loop.</description>
      <pubDate>Tue, 03 Mar 2020 10:02:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216002#M12197</guid>
      <dc:creator>Parikhharshal</dc:creator>
      <dc:date>2020-03-03T10:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extract strings from log file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216003#M12198</link>
      <description>&lt;P&gt;Yes, I see that in your input code (populating the ArrayLists), but in your output code (getting the data from the ArrayLists) it will probably be better to use a for loop&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 10:12:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Extract-strings-from-log-file/m-p/2216003#M12198</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-03-03T10:12:32Z</dc:date>
    </item>
  </channel>
</rss>

