<?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 [resolved] Can the SQL Expression in &amp;quot;Additional Columns&amp;quot; be dynamically modified in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-the-SQL-Expression-in-quot-Additional-Columns-quot/m-p/2377302#M139185</link>
    <description>Is it possible to dynamically modify the value of the SQL Expression field in the Additional Columns section of a tOracleOutput component? 
&lt;BR /&gt;I've been trying to use a context variable to see if I can change this value on the fly, but it does not seem to be working. 
&lt;BR /&gt;Here is what I've done so far: 
&lt;BR /&gt;1. Create a context variable called var1 and assign it a value of ''ValueSetInContext''. 
&lt;BR /&gt;2. Create a flow which inserts data into an Oracle table via tOracleOutput component (using Drop table in exists and create option). 
&lt;BR /&gt;3. In the Additional Columns section, I add a new column called "DUMMY" and in the SQL Expression field I put this: context.var1 
&lt;BR /&gt;4. Run the program, and I can see that the DUMMY field got populated with this string: ValueSetInContext 
&lt;BR /&gt;5. Next, I decided to send the data flow through a tJavaRow component so I could modify the value of the context.var1 variable. In this component, I have this code: 
&lt;BR /&gt; context.var1="ValueSetIntJavaComponent"; 
&lt;BR /&gt; System.out.println(context.var1); 
&lt;BR /&gt;6. Then I map the data flow from the tJavaRow component into the tOracleOutput component just as before (leaving the value of the SQL Expression as context.var1). 
&lt;BR /&gt;7. Run the program, and the DUMMY field still gets populated with ValueSetInContext instead of ValueSetIntJavaComponent. 
&lt;BR /&gt;My conclusion is that the SQL Expression gets evaluated right at the beginning of the job execution and never changes after that. 
&lt;BR /&gt;Can anyone verify this or provide an example of how to modify that value on the fly? 
&lt;BR /&gt;Thanks.</description>
    <pubDate>Sat, 16 Nov 2024 13:32:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T13:32:08Z</dc:date>
    <item>
      <title>[resolved] Can the SQL Expression in "Additional Columns" be dynamically modified</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-the-SQL-Expression-in-quot-Additional-Columns-quot/m-p/2377302#M139185</link>
      <description>Is it possible to dynamically modify the value of the SQL Expression field in the Additional Columns section of a tOracleOutput component? 
&lt;BR /&gt;I've been trying to use a context variable to see if I can change this value on the fly, but it does not seem to be working. 
&lt;BR /&gt;Here is what I've done so far: 
&lt;BR /&gt;1. Create a context variable called var1 and assign it a value of ''ValueSetInContext''. 
&lt;BR /&gt;2. Create a flow which inserts data into an Oracle table via tOracleOutput component (using Drop table in exists and create option). 
&lt;BR /&gt;3. In the Additional Columns section, I add a new column called "DUMMY" and in the SQL Expression field I put this: context.var1 
&lt;BR /&gt;4. Run the program, and I can see that the DUMMY field got populated with this string: ValueSetInContext 
&lt;BR /&gt;5. Next, I decided to send the data flow through a tJavaRow component so I could modify the value of the context.var1 variable. In this component, I have this code: 
&lt;BR /&gt; context.var1="ValueSetIntJavaComponent"; 
&lt;BR /&gt; System.out.println(context.var1); 
&lt;BR /&gt;6. Then I map the data flow from the tJavaRow component into the tOracleOutput component just as before (leaving the value of the SQL Expression as context.var1). 
&lt;BR /&gt;7. Run the program, and the DUMMY field still gets populated with ValueSetInContext instead of ValueSetIntJavaComponent. 
&lt;BR /&gt;My conclusion is that the SQL Expression gets evaluated right at the beginning of the job execution and never changes after that. 
&lt;BR /&gt;Can anyone verify this or provide an example of how to modify that value on the fly? 
&lt;BR /&gt;Thanks.</description>
      <pubDate>Sat, 16 Nov 2024 13:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-the-SQL-Expression-in-quot-Additional-Columns-quot/m-p/2377302#M139185</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can the SQL Expression in "Additional Columns" be dynamically modified</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-the-SQL-Expression-in-quot-Additional-Columns-quot/m-p/2377303#M139186</link>
      <description>Hello 
&lt;BR /&gt;You need use tFlowToIterate to iterate each row. See my screenshots.
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Thu, 25 Feb 2010 03:58:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-the-SQL-Expression-in-quot-Additional-Columns-quot/m-p/2377303#M139186</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-25T03:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Can the SQL Expression in "Additional Columns" be dynamically modified</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Can-the-SQL-Expression-in-quot-Additional-Columns-quot/m-p/2377304#M139187</link>
      <description>Thanks again. This worked as well.</description>
      <pubDate>Thu, 25 Feb 2010 16:43:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Can-the-SQL-Expression-in-quot-Additional-Columns-quot/m-p/2377304#M139187</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-25T16:43:17Z</dc:date>
    </item>
  </channel>
</rss>

