<?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] tJavaRow and ternary operator? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tJavaRow-and-ternary-operator/m-p/2296240#M68924</link>
    <description>The java was wrong, I got it fixed:&lt;BR /&gt;output_row.ColumnA = input_row.ColumnB.equals("C") ? input_row.ColumnA : new BigDecimal(0);</description>
    <pubDate>Thu, 27 May 2010 22:10:34 GMT</pubDate>
    <dc:creator>jkrfs</dc:creator>
    <dc:date>2010-05-27T22:10:34Z</dc:date>
    <item>
      <title>[resolved] tJavaRow and ternary operator?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tJavaRow-and-ternary-operator/m-p/2296239#M68923</link>
      <description>Greetings, I need to check for a specific string in a column before I allow another column pass through its value, if not I want to make it 0. 
&lt;BR /&gt;For example, I have two columns (A, B) with two rows. 
&lt;BR /&gt;# A B 
&lt;BR /&gt;1 100 C 
&lt;BR /&gt;2 50 M 
&lt;BR /&gt;Column A is a Big Decimal and column B is a String. I run the flow through a tJavaRow and I use the condition: 
&lt;BR /&gt;output_row.ColumnA = input_row.ColumnB.equals("C") ? input_row.ColumnA : 0; 
&lt;BR /&gt;So after tJavaRow, the results look like 
&lt;BR /&gt;# A B 
&lt;BR /&gt;1 100 C 
&lt;BR /&gt;2 0 M 
&lt;BR /&gt;However, I am getting this error: 
&lt;BR /&gt;Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
&lt;BR /&gt; Type mismatch: cannot convert from Number&amp;amp;Comparable&amp;lt;?&amp;gt; to BigDecimal 
&lt;BR /&gt;Is there something wrong with my Java? Or is this not allowed in Talend? 
&lt;BR /&gt;Thank you!</description>
      <pubDate>Sat, 16 Nov 2024 13:25:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tJavaRow-and-ternary-operator/m-p/2296239#M68923</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2024-11-16T13:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tJavaRow and ternary operator?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tJavaRow-and-ternary-operator/m-p/2296240#M68924</link>
      <description>The java was wrong, I got it fixed:&lt;BR /&gt;output_row.ColumnA = input_row.ColumnB.equals("C") ? input_row.ColumnA : new BigDecimal(0);</description>
      <pubDate>Thu, 27 May 2010 22:10:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tJavaRow-and-ternary-operator/m-p/2296240#M68924</guid>
      <dc:creator>jkrfs</dc:creator>
      <dc:date>2010-05-27T22:10:34Z</dc:date>
    </item>
  </channel>
</rss>

