<?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: [resolved] Question about TJavaRow comparing string values. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271072#M48787</link>
    <description>Hi, 
&lt;BR /&gt;I wanted the flag..I need to use it in the further process.&amp;nbsp; 
&lt;BR /&gt;My Code which I am inserting in tjavarow &amp;nbsp;is as below: 
&lt;BR /&gt;int flag1=0, flag2=0; 
&lt;BR /&gt;if (output_row.OU_CODE.equals("LMS")) 
&lt;BR /&gt;flag1 = 1; 
&lt;BR /&gt;else (output_row.OU_CODE.equals("SPAR")) 
&lt;BR /&gt;flag2 = 1; 
&lt;BR /&gt;But tjavarow is giving me &amp;nbsp;errors like..&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/390619/error1.png_20160809-2316.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDIi.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157519iE8E6734CBF2CF54B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDIi.png" alt="0683p000009MDIi.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt;Please help me write this code well so that tjavarow wont give me errors. Also After tjava row I have runif condition which will check if flag1==0 || flag2==0 and then send a mail.&amp;nbsp;</description>
    <pubDate>Wed, 10 Aug 2016 07:14:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-08-10T07:14:56Z</dc:date>
    <item>
      <title>[resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271063#M48778</link>
      <description>I need to compare global variable value with string value. And if condition JOB must be stopped.&lt;BR /&gt;I did this on TJavaRow:&lt;BR /&gt;System.out.println("My value " + globalMap.get("IsLocked")) ;&lt;BR /&gt;if (globalMap.get("IsLocked") == "N") {System.out.println("Then");}&lt;BR /&gt; else {throw new RuntimeException("----Raise error-------");};&lt;BR /&gt;Why condition doesn't work? It raises error while Println returns " My value N".&lt;BR /&gt;Global variable type is Char.</description>
      <pubDate>Sat, 16 Nov 2024 12:56:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271063#M48778</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271064#M48779</link>
      <description>Hi,
&lt;BR /&gt;Use the Java equals() function instead of the == operator for string comparisons.
&lt;BR /&gt;( (String)globalMap.get("isLocked") ).equals("N")</description>
      <pubDate>Wed, 04 May 2011 12:02:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271064#M48779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-04T12:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271065#M48780</link>
      <description>Hi walkerca,
&lt;BR /&gt;now code looks like:
&lt;BR /&gt;System.out.println("My value " + globalMap.get("IsLocked")) ;
&lt;BR /&gt;if (( (String)globalMap.get("IsLocked") ).equals("N")) {System.out.println("Then");}
&lt;BR /&gt; //else {System.out.println("Then2");};
&lt;BR /&gt; else {throw new RuntimeException("----Raise error-------");};
&lt;BR /&gt;But i get error: 
&lt;BR /&gt;Exception in component tJavaRow_2
&lt;BR /&gt;java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.String
&lt;BR /&gt;When i remove (String) option it doesn't compares values in right way. I mean runs "---- Raise error ---" while value is "N" Println returns - My value N
&lt;BR /&gt;I tried IsLocked in MSSQLInput Edit schema change DB type between CHAR and VARCHAR but it didn't help..
&lt;BR /&gt;EDIT : need to change Type to String in Edit Schema.
&lt;BR /&gt;Thanks.</description>
      <pubDate>Thu, 05 May 2011 06:49:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271065#M48780</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-05T06:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271066#M48781</link>
      <description>try updating your if condition to this.
&lt;BR /&gt;
&lt;PRE&gt;if (globalMap.get("IsLocked").toString().equals("N")){ System.out.println("Then"); }&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 May 2011 16:15:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271066#M48781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-05T16:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271067#M48782</link>
      <description>Was isLocked set with a 'N' rather than "N" (single versus double quotes)?  Make sure that it was actually loaded in the globalMap as a String.</description>
      <pubDate>Thu, 05 May 2011 23:41:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271067#M48782</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-05T23:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271068#M48783</link>
      <description>Hii everyone,&lt;BR /&gt;I am very new to talend. I have a flat file in .csv form. In the flat file there is a field which can have values like lms/spar/max. It is mandatory that at least once these three names has to occur in the flat-file. If the File don't have any one of this option, I have to send a mail. What should I do?&lt;BR /&gt;I tried something like this:&lt;BR /&gt;FileInputDelimited -&amp;gt; tjavarow -&amp;gt;runif -&amp;gt; tsendmail&lt;BR /&gt;I tried using flag to check if any of these option are not present. But its showing error as 'flag cannot be resolved to a variable'!&lt;BR /&gt;please tell me a way out to solve this problem.</description>
      <pubDate>Tue, 09 Aug 2016 08:09:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271068#M48783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-09T08:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271069#M48784</link>
      <description>Hi,&lt;BR /&gt;Use a tFilter to get records with one of the three values mls/spar/max.&lt;BR /&gt;If no row goes to the the filtered output, then no records contains the desired values and you can go with tSendMail.&lt;BR /&gt;No tJavaRow required for this.&lt;BR /&gt;Regards,&lt;BR /&gt;TRF</description>
      <pubDate>Tue, 09 Aug 2016 09:17:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271069#M48784</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2016-08-09T09:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271070#M48785</link>
      <description>Hi,&lt;BR /&gt;Thanks a bunch TRF for your suggestion. But I am already using three filters to send the LMS/SPAR/MAX into its respective database table. So now how should I check whether there is data passing through it or not.&amp;nbsp;&lt;BR /&gt;my whole process looks like this&lt;BR /&gt;FileInputDelimited -&amp;gt; tmap -&amp;gt; tfilterrow -&amp;gt; lms data into lms database&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|_ -&amp;gt;&amp;nbsp;tfilterrow -&amp;gt; spar data into spar database&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|_ -&amp;gt;&amp;nbsp;tfilterrow -&amp;gt; max data into max database&amp;nbsp;&lt;BR /&gt;Now how should I add a check in tfilter row to check if no row is passing through it into the database.</description>
      <pubDate>Tue, 09 Aug 2016 13:10:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271070#M48785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-09T13:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271071#M48786</link>
      <description>Just add a tJavaRow after each tFilterRow to compute the number of rows using a dedicated global variable.
&lt;BR /&gt;This way, you may avoid to call the txxxxxOutput components when the corresponding number of rows is equal to 0.
&lt;BR /&gt;This is a solution, many other may exist as TOS is very adaptable.
&lt;BR /&gt;TRF</description>
      <pubDate>Tue, 09 Aug 2016 13:24:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271071#M48786</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2016-08-09T13:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Question about TJavaRow comparing string values.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271072#M48787</link>
      <description>Hi, 
&lt;BR /&gt;I wanted the flag..I need to use it in the further process.&amp;nbsp; 
&lt;BR /&gt;My Code which I am inserting in tjavarow &amp;nbsp;is as below: 
&lt;BR /&gt;int flag1=0, flag2=0; 
&lt;BR /&gt;if (output_row.OU_CODE.equals("LMS")) 
&lt;BR /&gt;flag1 = 1; 
&lt;BR /&gt;else (output_row.OU_CODE.equals("SPAR")) 
&lt;BR /&gt;flag2 = 1; 
&lt;BR /&gt;But tjavarow is giving me &amp;nbsp;errors like..&amp;nbsp; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;A href="https://community.talend.com/legacyfs/online/membersTempo/390619/error1.png_20160809-2316.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDIi.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157519iE8E6734CBF2CF54B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDIi.png" alt="0683p000009MDIi.png" /&gt;&lt;/span&gt; &lt;/A&gt; 
&lt;BR /&gt;Please help me write this code well so that tjavarow wont give me errors. Also After tjava row I have runif condition which will check if flag1==0 || flag2==0 and then send a mail.&amp;nbsp;</description>
      <pubDate>Wed, 10 Aug 2016 07:14:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Question-about-TJavaRow-comparing-string-values/m-p/2271072#M48787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-10T07:14:56Z</dc:date>
    </item>
  </channel>
</rss>

