<?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: if else in Talend in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233025#M22801</link>
    <description>Sorry Lijo I'm sure i'm missing something very obvious but I don't seem to follow what you're telling me. Please see screen shot below to see what I have set up.
&lt;BR /&gt;I'm not sure what row link option I should be entering in. I've tried a few to no avail, I'm assuming I've left out a component.......or 2
&lt;BR /&gt;thanks for you help with this.
&lt;BR /&gt;
&lt;BR /&gt;regards,
&lt;BR /&gt;
&lt;BR /&gt;Dave</description>
    <pubDate>Tue, 08 Mar 2011 10:19:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-03-08T10:19:19Z</dc:date>
    <item>
      <title>if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233021#M22797</link>
      <description>Hi all,
&lt;BR /&gt;Can anyone direct me as how to create an if/esle statement using Talend.
&lt;BR /&gt;I have an SQL statement that gets the count of the number of fields across several tables and based on this output I want to go 1 of 2 ways.
&lt;BR /&gt;if count = 0 
&lt;BR /&gt; then proceed with job - loading data into DB
&lt;BR /&gt;if count &amp;gt; 1
&lt;BR /&gt; then send message to say DB is not empty.
&lt;BR /&gt;Getting the counter values if fine and generating the two options is fine however getting it to go down route 1 Vs. route 2 based on a certain values is the problem.
&lt;BR /&gt;thanks in advance guys,
&lt;BR /&gt;
&lt;BR /&gt;Dave</description>
      <pubDate>Sat, 16 Nov 2024 13:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233021#M22797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233022#M22798</link>
      <description>Hi Dave,&lt;BR /&gt;you can set the count value in a context variable,&lt;BR /&gt;                      ------if((Integer)globalMap.get(row1.count)==1)----&amp;gt;job1&lt;BR /&gt;tOracleInput--&lt;BR /&gt;                      ------if((Integer)globalMap.get(row1.count)&amp;gt;1)------&amp;gt;job2&lt;BR /&gt;&lt;BR /&gt;where row1 is the rowname and count should be the schema variable (result from the query).</description>
      <pubDate>Tue, 08 Mar 2011 09:34:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233022#M22798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T09:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233023#M22799</link>
      <description>Thanks Lijo&lt;BR /&gt;do I put the if statements you listed below into a tMap or a tJavaRow or some other component?&lt;BR /&gt;Also will I get two row link options from this componet once I have these if statements listed?&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 08 Mar 2011 09:43:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233023#M22799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T09:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233024#M22800</link>
      <description>Hi&lt;BR /&gt;when you rightclick on a component you can see (Run if), please put the values there.</description>
      <pubDate>Tue, 08 Mar 2011 09:54:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233024#M22800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T09:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233025#M22801</link>
      <description>Sorry Lijo I'm sure i'm missing something very obvious but I don't seem to follow what you're telling me. Please see screen shot below to see what I have set up.
&lt;BR /&gt;I'm not sure what row link option I should be entering in. I've tried a few to no avail, I'm assuming I've left out a component.......or 2
&lt;BR /&gt;thanks for you help with this.
&lt;BR /&gt;
&lt;BR /&gt;regards,
&lt;BR /&gt;
&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 08 Mar 2011 10:19:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233025#M22801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T10:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233026#M22802</link>
      <description>hi&lt;BR /&gt;Sorry, you can put the result into a tJavaRow and do it.</description>
      <pubDate>Tue, 08 Mar 2011 10:21:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233026#M22802</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T10:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233027#M22803</link>
      <description>Hi&lt;BR /&gt;you can do like&lt;BR /&gt;tPostgreeInput--&amp;gt;tJavaRow---if&lt;BR /&gt;a context variable can be decleared and pass the result into the context variable i.e in tJavaRow&lt;BR /&gt;Context.count=input_row.column1;&lt;BR /&gt;and in the if (context.count==1)</description>
      <pubDate>Tue, 08 Mar 2011 10:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233027#M22803</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T10:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233028#M22804</link>
      <description>thanks for the extra detail Lijo, unfortunately I still seem to be getting an error. see below. 
&lt;BR /&gt;I have the result of the postgresqlInput being assigned to the context variable that I set up (as an int) and I've also played around with removing the output schema and leaving it in. I don't think the context variable is picking up the output of the SQL query though. 
&lt;BR /&gt;the full error I'm getting is 
&lt;BR /&gt;Starting job mbp_010_upload_staging at 12:08 08/03/2011. 
&lt;BR /&gt; connecting to socket on port 3718 
&lt;BR /&gt; connected 
&lt;BR /&gt;Exception in component tJavaRow_1 
&lt;BR /&gt;java.lang.NullPointerException 
&lt;BR /&gt; at ripping_files.mbp_010_upload_staging_0_1.mbp_010_upload_staging.tPostgresqlInput_1Process(mbp_010_upload_staging.java:1051) 
&lt;BR /&gt; at ripping_files.mbp_010_upload_staging_0_1.mbp_010_upload_staging$2.run(mbp_010_upload_staging.java:5397) 
&lt;BR /&gt; disconnected 
&lt;BR /&gt;Job mbp_010_upload_staging ended at 12:11 08/03/2011.</description>
      <pubDate>Tue, 08 Mar 2011 12:03:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233028#M22804</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T12:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233029#M22805</link>
      <description>Hi&lt;BR /&gt;There are null values coming from your SQL query. Have you declared the counter variable as int&lt;BR /&gt;similary the count value coming sql output as int&lt;BR /&gt;Can you put the what have you written in the if statement.</description>
      <pubDate>Tue, 08 Mar 2011 12:51:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233029#M22805</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T12:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233030#M22806</link>
      <description>I've run the query from the postgresqlInput and it returns 0 if the table is emtpty or the a row count if it's not. I've output this to a tlog to make sure it's pulling back the correct value and it is, it also has no null values being returned. 
&lt;BR /&gt;the output schema of the postgresqlInput is one value called - table_count and it's an integer value 
&lt;BR /&gt;the input schema of the tjava row is - table_count and it's an integer value 
&lt;BR /&gt;I have disabled the output schema of the tjavarow as there is not meant to be any input........is this correct? 
&lt;BR /&gt;I right click on the tjava row and selected the "run if" option. right clicked again and went to settings and entered 
&lt;BR /&gt;((Integer)globalMap.get(context.counter)&amp;gt;0) 
&lt;BR /&gt;I repeated this step, right click on the tjava row and selected the "run if" option. right clicked again and went to settings and entered 
&lt;BR /&gt;((Integer)globalMap.get(context.counter)==0) 
&lt;BR /&gt;I've uploaded 7 images below 
&lt;BR /&gt;1. the output of tPostgresqlInput to the log 
&lt;BR /&gt;2. the schema of tPostgresqlInput 
&lt;BR /&gt;3. the schema and code of the tjavaRow 
&lt;BR /&gt;4. the settings for one of the "run if" statements 
&lt;BR /&gt;5. the context variable declaration 
&lt;BR /&gt;6. the default value assigned to the context variable 
&lt;BR /&gt;7. the error message 
&lt;BR /&gt; 
&lt;BR /&gt;thanks for your time with this Lijo, any help is greatly appreciated. 
&lt;BR /&gt;regards, 
&lt;BR /&gt; 
&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 08 Mar 2011 14:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233030#M22806</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T14:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233031#M22807</link>
      <description>Hi Dave
&lt;BR /&gt;I found out whats the problem, Please remover the 
&lt;B&gt;((Integer)globalMap.get(context.counter)==0)&lt;/B&gt; and make it to 
&lt;BR /&gt;
&lt;B&gt;context.counter==0&lt;/B&gt;, no need to give globalmap in case of context variables.
&lt;BR /&gt;Please correct and let me know any problem.</description>
      <pubDate>Tue, 08 Mar 2011 15:28:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233031#M22807</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T15:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: if else in Talend</title>
      <link>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233032#M22808</link>
      <description>Even though I thought I tried that it works fine now............happy days!!!&lt;BR /&gt;Thanks for all you help Lijo.&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 08 Mar 2011 15:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/if-else-in-Talend/m-p/2233032#M22808</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T15:47:23Z</dc:date>
    </item>
  </channel>
</rss>

