<?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: Get error when trying to use component context variable in tRunJob in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Get-error-when-trying-to-use-component-context-variable-in/m-p/2266560#M45737</link>
    <description>&lt;P&gt;The reason you are having an issue here is that the Context Param section of the tRunJob is essentially interpreted as a single line of Java. This has many advantages in that you can make method calls, etc, but it means that you need to pass values as you would in code. If you are passing a String in Java you would need to wrap it in double quotes. Therefore you need to add...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;"TYPE='MODEL'"&lt;/PRE&gt;</description>
    <pubDate>Thu, 21 Nov 2019 21:04:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-11-21T21:04:42Z</dc:date>
    <item>
      <title>Get error when trying to use component context variable in tRunJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-error-when-trying-to-use-component-context-variable-in/m-p/2266559#M45736</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm trying to figure out a way to start the same job with diffrent parameters. I know there are a lot of ways of doing it but I'm tryin to use tRunJob for it. See what happens below&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;First I run the child job on its own and it works fine with the context parameter&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="child job works with context parameter.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8DZ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155456iE44FE3308BC2799A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8DZ.png" alt="0683p000009M8DZ.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I then set the context variable in the child job to null and sets the value in the tRunJob instead, in its context page and it works fine, see below&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parent job works with context parameter.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8De.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153227i438B6BB54F358818/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8De.png" alt="0683p000009M8De.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now i set the context variable in the context page to NULL and then I want to use the context variable in the tRunJob component, see below&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parent job with component context parameter.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7zY.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139165iBB46371A3787FF1F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7zY.png" alt="0683p000009M7zY.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But when running it I get an error that I can't figure out the reason for, see below&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="parent job not working with component context parameter.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8Dj.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139190iAFD7311C64D9FB82/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8Dj.png" alt="0683p000009M8Dj.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I'm not sure what I am do wrong. This is what it says in the help about tRunJob&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;TABLE border="1"&gt; 
 &lt;TBODY&gt; 
  &lt;TR&gt; 
   &lt;TD&gt;&lt;P&gt;&lt;SPAN class="emphasis"&gt;&lt;EM&gt;Context Param&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt; 
   &lt;TD&gt;&lt;P&gt;You can change the value of selected context parameters. Click the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphasis"&gt;&lt;STRONG&gt;[+]&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;button to add the parameters defined in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphasis"&gt;&lt;STRONG&gt;Context&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;tab of the child Job. For more information on context parameters, see&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphasis"&gt;&lt;EM&gt;Talend Studio User Guide&lt;/EM&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;The values defined here will be used during the child Job execution even if&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphasis"&gt;&lt;STRONG&gt;Transmit whole context&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is selected.&lt;/P&gt;&lt;/TD&gt; 
  &lt;/TR&gt; 
 &lt;/TBODY&gt; 
&lt;/TABLE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And thats the reason I thought I could use it this way. pls help&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Patrik&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>Sat, 16 Nov 2024 04:03:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-error-when-trying-to-use-component-context-variable-in/m-p/2266559#M45736</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Get error when trying to use component context variable in tRunJob</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Get-error-when-trying-to-use-component-context-variable-in/m-p/2266560#M45737</link>
      <description>&lt;P&gt;The reason you are having an issue here is that the Context Param section of the tRunJob is essentially interpreted as a single line of Java. This has many advantages in that you can make method calls, etc, but it means that you need to pass values as you would in code. If you are passing a String in Java you would need to wrap it in double quotes. Therefore you need to add...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;"TYPE='MODEL'"&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Nov 2019 21:04:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Get-error-when-trying-to-use-component-context-variable-in/m-p/2266560#M45737</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-21T21:04:42Z</dc:date>
    </item>
  </channel>
</rss>

