<?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: How to pass context variable value from TAC to a job? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353965#M120043</link>
    <description>&lt;P&gt;I don't know how to make that work, if I'm understanding your setup correctly.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a job that has to run at midnight before some other jobs that run every hour. I have a tJava component that sets the context variable "isMidnight", and I use "run if" links from it to choose a different set of subjobs to run based on the time.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Jul 2018 17:47:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-07-16T17:47:20Z</dc:date>
    <item>
      <title>How to pass context variable value from TAC to a job?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353964#M120042</link>
      <description>&lt;P&gt;I have 2 jobs setup in TAC, one runs at night and one runs at daytime.&amp;nbsp; &amp;nbsp; When 1st job runs, it should pass a value 'A' and&amp;nbsp;2nd job runs, it should pass a value 'I'.&amp;nbsp; Context variable is called PassRunValue.&lt;/P&gt;
&lt;P&gt;Inside both of these two jobs, I've defined the context variable PassRunValue = "A" for job1&lt;/P&gt;
&lt;P&gt;and&amp;nbsp;&lt;SPAN&gt;PassRunValue = "I"&amp;nbsp; for job2.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can we pass the value from TAC to the a job?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my job has&amp;nbsp;&lt;/P&gt;
&lt;P&gt;tjava---&amp;gt;if 'A'---&amp;gt;tmssqlinput---&amp;gt;tlogrow&lt;/P&gt;
&lt;P&gt;tjava---&amp;gt;if 'I'&lt;SPAN&gt;'---&amp;gt;tmssqlinput---&amp;gt;tmssqloutput&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Currently tjava contains:&amp;nbsp;&amp;nbsp;context.PassRunValue = "";&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 17:13:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353964#M120042</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-07-16T17:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass context variable value from TAC to a job?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353965#M120043</link>
      <description>&lt;P&gt;I don't know how to make that work, if I'm understanding your setup correctly.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have a job that has to run at midnight before some other jobs that run every hour. I have a tJava component that sets the context variable "isMidnight", and I use "run if" links from it to choose a different set of subjobs to run based on the time.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 17:47:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353965#M120043</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-16T17:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass context variable value from TAC to a job?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353966#M120044</link>
      <description>&lt;P&gt;Can you show the setup with the screen shot. I'm trying to see how you are setting&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;context variable "isMidnight".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 17:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353966#M120044</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-07-16T17:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass context variable value from TAC to a job?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353967#M120045</link>
      <description>&lt;P&gt;Here's the if logic&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="runIfSample.PNG" style="width: 390px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LzHr.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157330i5309596815404D8F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LzHr.png" alt="0683p000009LzHr.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;The "InitializeContext" tJava component contains:&lt;/P&gt; 
&lt;PRE&gt;ZonedDateTime thisHour = ZonedDateTime.now(ZoneId.of("US/Pacific")).truncatedTo(ChronoUnit.HOURS);
context.isMidnight = thisHour.getHour() == 0;&lt;/PRE&gt; 
&lt;P&gt;The "Run if" conditions are then just simply "context.isMidnight" and "!context.isMidnight". This is the Stackoverflow post with the general approach:&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/24504935/skip-a-component-based-on-condition-in-talend" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/24504935/skip-a-component-based-on-condition-in-talend&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 18:03:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353967#M120045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-07-16T18:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass context variable value from TAC to a job?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353968#M120046</link>
      <description>&lt;P&gt;I'm trying to understand, when I pass the value for&amp;nbsp;&lt;SPAN&gt;PassRunValue&amp;nbsp;variable&lt;/SPAN&gt; from TAC, does it overwrite the value set in tjava?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Passing&amp;nbsp;&lt;SPAN&gt;PassRunValue&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;= "A" from TAC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2.&amp;nbsp; Job has tjava component, which has value of&amp;nbsp;&amp;nbsp;context.PassRunValue = "";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3.&amp;nbsp; Would tjava component set&amp;nbsp;the context variable context.PassRunValue =&amp;nbsp;"A" ?&lt;/SPAN&gt;&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jul 2018 21:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-context-variable-value-from-TAC-to-a-job/m-p/2353968#M120046</guid>
      <dc:creator>rp2018</dc:creator>
      <dc:date>2018-07-16T21:52:37Z</dc:date>
    </item>
  </channel>
</rss>

