<?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 How to override context variable? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297362#M69944</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I want to change the value of a context variable and save it permanently in a context file.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is what I tried already :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="context1.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lx0e.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141471iEE8B846C2A3A1CB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lx0e.png" alt="0683p000009Lx0e.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="context2.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lwjp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139902i71A17C308286BE03/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lwjp.png" alt="0683p000009Lwjp.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The System.out.println() gives me a "b", but when I go into the file written by the tContextDump component it still prints an "a" :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="context3.PNG" style="width: 224px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lwol.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137604i4E036D7E09D0A400/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lwol.png" alt="0683p000009Lwol.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Apr 2018 08:35:57 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-04-26T08:35:57Z</dc:date>
    <item>
      <title>How to override context variable?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297362#M69944</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I want to change the value of a context variable and save it permanently in a context file.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is what I tried already :&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="context1.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lx0e.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141471iEE8B846C2A3A1CB3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lx0e.png" alt="0683p000009Lx0e.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="context2.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lwjp.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139902i71A17C308286BE03/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lwjp.png" alt="0683p000009Lwjp.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The System.out.println() gives me a "b", but when I go into the file written by the tContextDump component it still prints an "a" :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="context3.PNG" style="width: 224px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lwol.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137604i4E036D7E09D0A400/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lwol.png" alt="0683p000009Lwol.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 08:35:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297362#M69944</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-26T08:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to override context variable?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297363#M69945</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;You need to use tContextLoad to update your context, so you need to follow this design:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 770px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lwec.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/144504i98F41B6DDA0B9A8F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lwec.png" alt="0683p000009Lwec.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;As you see the context contains 3 variables. tLogRow_45 gives the initial values for them.&lt;/P&gt; 
&lt;P&gt;In tJavaRow, I set the value of the "sample" variable like this before to use tContextLoad:&lt;/P&gt; 
&lt;PRE&gt;output_row.key = input_row.key;
if(input_row.key.equals("sample"))
  output_row.value = "100";
else
  output_row.value = input_row.value;&lt;/PRE&gt; 
&lt;P&gt;Then the next tContextDump gives me the expected result as you can see.&lt;/P&gt; 
&lt;P&gt;That's for the principle, maybe there is other approach to do that.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Apr 2018 09:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297363#M69945</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-04-26T09:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to override context variable?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297364#M69946</link>
      <description>Thank you</description>
      <pubDate>Thu, 26 Apr 2018 10:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297364#M69946</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-26T10:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to override context variable?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297365#M69947</link>
      <description>You're welcome</description>
      <pubDate>Thu, 26 Apr 2018 10:58:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-override-context-variable/m-p/2297365#M69947</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-04-26T10:58:24Z</dc:date>
    </item>
  </channel>
</rss>

