<?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: Run a job based on value in database in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281893#M56280</link>
    <description>&lt;P&gt;Thanks I will try this out&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, may I know why this does not work with tjava?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rathi&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2017 09:27:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-17T09:27:30Z</dc:date>
    <item>
      <title>Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281885#M56272</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want a job that runs only &amp;nbsp;when there is a value present in one of the tables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example - if the value col1 in &amp;nbsp;select col1 from table is 'abc' then only will I execute the jobs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on this would be of great help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rathi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 08:41:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281885#M56272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-16T08:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281886#M56273</link>
      <description>Hi,&lt;BR /&gt;You need to start the job periodicaly, query the table and if the value doesn't match the expected value, stop the job using a tDie.</description>
      <pubDate>Tue, 16 May 2017 08:56:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281886#M56273</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-05-16T08:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281887#M56274</link>
      <description>&lt;P&gt;I may be misunderstanding this question, but are you asking for a way to identify which job to run by the data in your database? If that is the question, you can use the "Use Dynamic Job" functionality of the tRunJob component. Essentially you need to have a parent job which runs a query on your DB. Depending on what it returns the job can select which child job to get the tRunJob to run.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 09:06:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281887#M56274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-16T09:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281888#M56275</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will explain a little in detail. Let's say I have&amp;nbsp;a job j1. This job must run only if the value select col1 from table = 'abc'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the value does not match then it should not execute, I don't want any error generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, if&lt;/P&gt;&lt;P&gt;value matches&lt;/P&gt;&lt;P&gt;then&lt;/P&gt;&lt;P&gt;execute job&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;do nothing&lt;/P&gt;&lt;P&gt;end if;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rathi&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 10:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281888#M56275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-16T10:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281889#M56276</link>
      <description>&lt;P&gt;You can do this using what &lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;&amp;nbsp;suggested, but don't use the tDie. Just use conditional logic (using RunIf links) based on the success or failure of the query. If the query returns the value you want, go down the RunIF pointing to the tRunJob used to run this job. If it doesn't, do nothing.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 11:22:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281889#M56276</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-16T11:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281890#M56277</link>
      <description>&lt;P&gt;OK, so you can go with the proposition I made on top of this topic, it's enough.&lt;/P&gt;&lt;P&gt;You just have to decide the scheduling to start the job when needed.&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 11:23:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281890#M56277</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-05-16T11:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281891#M56278</link>
      <description>&lt;P&gt;Hi, thanks for the reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to do this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tmssqlinput --&amp;gt; tmap --&amp;gt; tjava --runif --&amp;gt; tsendmail&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in tmssqlinput I have the query,&amp;nbsp;"select [Values] val from lookupvalues where tablename = 'ETLSource'" which returns the value "devsprint13"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in tjava I have the code as&amp;nbsp;context.source= row1.val;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In runif the code is "devsprint13".equals(context.source)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I run the job, the runif returns a false.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I try to see the output of tjava using a tlogrow the context.source has no value assigned.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't understand why the value of the query output is not being assigned to &amp;nbsp;context.source in tjava (&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;context.source= row1.val;&lt;/SPAN&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas on this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rathi&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 08:52:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281891#M56278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T08:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281892#M56279</link>
      <description>&lt;P&gt;Use a tSetGlobalVar instead of the tJava component. If you are not aware of this component, it allows you to set a hashmap variable from a column in the data row. To use this in the RunIf you would do something like&amp;nbsp;this (assume the name of the variable is "myVar")....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;globalMap.get("myVar")!=null &amp;amp;&amp;amp;&amp;nbsp;((String)globalMap.get("myVar")).equals("devsprint13")&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 May 2017 09:18:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281892#M56279</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T09:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281893#M56280</link>
      <description>&lt;P&gt;Thanks I will try this out&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, may I know why this does not work with tjava?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rathi&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 09:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281893#M56280</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T09:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281894#M56281</link>
      <description>&lt;P&gt;The tJava is not really an "on row" component *could* be one of the reasons. The context variable has not been properly assigned before testing the RunIf condition, *could* be another reason. I'd have to look at the job. But this way would be a better way of doing this. If this doesn't work you will need to check that your tMap is configured properly.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2017 09:30:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281894#M56281</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-17T09:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281895#M56282</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When I connect the tjava to a tlogrow then I do get the output as desired. Only When I have connected to RunIf the code always returns a false&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The job design is as I have explained in my previous reply&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rathi&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 06:59:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281895#M56282</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-18T06:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281896#M56283</link>
      <description>Can you a capture + the condition?</description>
      <pubDate>Thu, 18 May 2017 07:38:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281896#M56283</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-05-18T07:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281897#M56284</link>
      <description>&lt;P&gt;Hi TRF, I am sorry I did not get what you are saying. You want me to give the condition in runif?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 08:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281897#M56284</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-18T08:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Run a job based on value in database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281898#M56285</link>
      <description>&lt;P&gt;Yes, it could be easier if we have a picture of the job and as you said the runIf link allways returned false, we need the condition you've written to try to help you.&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2017 08:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-a-job-based-on-value-in-database/m-p/2281898#M56285</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-05-18T08:54:13Z</dc:date>
    </item>
  </channel>
</rss>

