<?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: Dynamic Variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable/m-p/2218834#M13875</link>
    <description>Easy to do:
&lt;BR /&gt;2 ways to do: use context variables or the globalMap (only accessible within the job).
&lt;BR /&gt;1. create a context variable (e.g. country as String type)
&lt;BR /&gt;2. add the database component to your job and add the query (at first with a fix value)
&lt;BR /&gt;"select ID, sum(revenue) from country_rev where country_name='USA'"
&lt;BR /&gt;3. now change the query to use your variable:
&lt;BR /&gt;"select ID, sum(revenue) from country_rev where country_name='" + context.country + "'"
&lt;BR /&gt;4. If you have your value in the globalMap here is the necessary query:
&lt;BR /&gt;"select ID, sum(revenue) from country_rev where country_name='" + globalMap.get("country") + "'"
&lt;BR /&gt;Talend only supports plain text replacements for the query in input components.
&lt;BR /&gt;You can also consider using the *row components, these comps supports prepared statement parameters.</description>
    <pubDate>Thu, 27 Dec 2012 09:39:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-12-27T09:39:30Z</dc:date>
    <item>
      <title>Dynamic Variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable/m-p/2218833#M13874</link>
      <description>Hi,&lt;BR /&gt;I am new to Talend. Can someone explain me the steps involved in passing a dynamic variable to a query using talend. From step 1 to step N if possible. I am not able to do so. I basically want to use a date pulled out from one table and use that in a query. The query should be able to dynamically carry the variable value as the date may change in the parent table. Please help&lt;BR /&gt;TIA</description>
      <pubDate>Thu, 27 Dec 2012 09:30:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable/m-p/2218833#M13874</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-12-27T09:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable/m-p/2218834#M13875</link>
      <description>Easy to do:
&lt;BR /&gt;2 ways to do: use context variables or the globalMap (only accessible within the job).
&lt;BR /&gt;1. create a context variable (e.g. country as String type)
&lt;BR /&gt;2. add the database component to your job and add the query (at first with a fix value)
&lt;BR /&gt;"select ID, sum(revenue) from country_rev where country_name='USA'"
&lt;BR /&gt;3. now change the query to use your variable:
&lt;BR /&gt;"select ID, sum(revenue) from country_rev where country_name='" + context.country + "'"
&lt;BR /&gt;4. If you have your value in the globalMap here is the necessary query:
&lt;BR /&gt;"select ID, sum(revenue) from country_rev where country_name='" + globalMap.get("country") + "'"
&lt;BR /&gt;Talend only supports plain text replacements for the query in input components.
&lt;BR /&gt;You can also consider using the *row components, these comps supports prepared statement parameters.</description>
      <pubDate>Thu, 27 Dec 2012 09:39:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable/m-p/2218834#M13875</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-12-27T09:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable/m-p/2218835#M13876</link>
      <description>How to pass the value of the variable to the global variable?????</description>
      <pubDate>Thu, 27 Dec 2012 09:59:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Variable/m-p/2218835#M13876</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-12-27T09:59:58Z</dc:date>
    </item>
  </channel>
</rss>

