<?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 Parameters in job for use in SQL query in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203960#M5035</link>
    <description>Hi All. 
&lt;BR /&gt;I m new in Talend ETL (most experience in SSIS). 
&lt;BR /&gt;Talend ver 4.2 and Oracle 11g DB. 
&lt;BR /&gt;How can I do this : 
&lt;BR /&gt;I have view. 
&lt;BR /&gt;I want to load data from this view with parameter 
&lt;BR /&gt;like : 
&lt;BR /&gt;Select * from V1 where f1 = 1 
&lt;BR /&gt;Select * from V1 where f1 = 2 
&lt;BR /&gt;... 
&lt;BR /&gt;Select * from V1 -- ALL data 
&lt;BR /&gt;So I need to pass parameter in job and use it in Query 
&lt;BR /&gt;I do OK it w/o parameters 
&lt;BR /&gt;but waht is way to pass them in job and use it in SQL (in SSIS there vars for that)?</description>
    <pubDate>Mon, 03 Sep 2012 12:11:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-09-03T12:11:41Z</dc:date>
    <item>
      <title>Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203960#M5035</link>
      <description>Hi All. 
&lt;BR /&gt;I m new in Talend ETL (most experience in SSIS). 
&lt;BR /&gt;Talend ver 4.2 and Oracle 11g DB. 
&lt;BR /&gt;How can I do this : 
&lt;BR /&gt;I have view. 
&lt;BR /&gt;I want to load data from this view with parameter 
&lt;BR /&gt;like : 
&lt;BR /&gt;Select * from V1 where f1 = 1 
&lt;BR /&gt;Select * from V1 where f1 = 2 
&lt;BR /&gt;... 
&lt;BR /&gt;Select * from V1 -- ALL data 
&lt;BR /&gt;So I need to pass parameter in job and use it in Query 
&lt;BR /&gt;I do OK it w/o parameters 
&lt;BR /&gt;but waht is way to pass them in job and use it in SQL (in SSIS there vars for that)?</description>
      <pubDate>Mon, 03 Sep 2012 12:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203960#M5035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-03T12:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203961#M5036</link>
      <description>Hi All again 
&lt;BR /&gt;I don't find parameters in job 
&lt;BR /&gt;Is there any way (ideas) to resolve this issue ? 
&lt;BR /&gt;May be approach for Talend is wrong and another exists ?</description>
      <pubDate>Tue, 04 Sep 2012 08:55:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203961#M5036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-04T08:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203962#M5037</link>
      <description>Hi and welcome to Talend.&lt;BR /&gt;You can set a global var with tSetGlobalVar (for example MyVar) and then pass the value to the query:&lt;BR /&gt;Select * from V1 where f1 = "+globalMap.get("MyVar")+"</description>
      <pubDate>Tue, 04 Sep 2012 08:59:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203962#M5037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-04T08:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203963#M5038</link>
      <description>&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;Hi and welcome to Talend.&lt;BR /&gt;You can set a global var with tSetGlobalVar (for example MyVar) and then pass the value to the query:&lt;BR /&gt;Select * from V1 where f1 = "+globalMap.get("MyVar")+"&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Wrong. To set parameters from the outside use context variables, not the global map.</description>
      <pubDate>Tue, 04 Sep 2012 09:04:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203963#M5038</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2012-09-04T09:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203964#M5039</link>
      <description>Thanks for answers&lt;BR /&gt;but how can I make where condition dynamically ?&lt;BR /&gt;Select * from V1 -- ALL data &lt;BR /&gt;when variable is null ?</description>
      <pubDate>Tue, 04 Sep 2012 12:48:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203964#M5039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-04T12:48:35Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203965#M5040</link>
      <description>Hi All
&lt;BR /&gt;I can set tis var but how can I use it in tOracleInput ?
&lt;BR /&gt;globalMap.get("v1") in Query ?
&lt;BR /&gt;?? Can I do smth like 
&lt;BR /&gt;Select * from where f1 = globalMap.get("v1")
&lt;BR /&gt;or 
&lt;BR /&gt;Select * from where f1 = context.gl_var01</description>
      <pubDate>Wed, 05 Sep 2012 11:04:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203965#M5040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T11:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203966#M5041</link>
      <description>use a context rather than a global variable.&lt;BR /&gt;"select * from where f1 = '" + context.contextname + "'"</description>
      <pubDate>Wed, 05 Sep 2012 11:27:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203966#M5041</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2012-09-05T11:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203967#M5042</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;use a context rather than a global variable.&lt;BR /&gt;"select * from where f1 = '" + context.contextname + "'"&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi janhess 
&lt;BR /&gt;Thanks for answer 
&lt;BR /&gt;but 
&lt;BR /&gt;1?) how to convert number to string with context.contextname 
&lt;BR /&gt;2?) - main problem 
&lt;BR /&gt;How can I specify this dynamic sql in query ? 
&lt;BR /&gt;Tried globalMap.get("v1") in Query field - it foes NOt work 
&lt;BR /&gt;( I plan to make dynamic SQL in variable - seems I need TsetGlovalvariable component) 
&lt;BR /&gt; 
&lt;BR /&gt;ps 
&lt;BR /&gt;"SELECT * FROM A0.STG_CUSTOMER where stg_customer_id &amp;gt; " + context.v_sys 
&lt;BR /&gt;seems - it works 
&lt;BR /&gt;but I need to pass whole SQL string for case SELECT * FROM A0.STG_CUSTOMER (w/o where condition) 
&lt;BR /&gt;. so I need to run SQL string made dynamically in OracleInput 
&lt;BR /&gt;How can I do that ?</description>
      <pubDate>Wed, 05 Sep 2012 12:58:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203967#M5042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-05T12:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203968#M5043</link>
      <description>Still need to do this &lt;BR /&gt;ps Is it my question strange ?&lt;BR /&gt;or Talend ETL is not popular enough to get answer to this simple question ?</description>
      <pubDate>Fri, 07 Sep 2012 13:55:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203968#M5043</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-07T13:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203969#M5044</link>
      <description>In your DB input component, customize the query. By default, it will be something like "SELECT col1, col2 from table". Change it to something like this: "SELECT col1, col2 from table " + globalMap.get("globalwhereClauseVar") or
&lt;BR /&gt;"SELECT col1, col2 from table " + context.whereClauseVar.
&lt;BR /&gt;Note the trailing space you must add after the FROM clause to allow the optional concatenated WHERE clause.
&lt;BR /&gt;If the WHERE clause variable is an empty string, you select all rows.
&lt;BR /&gt;The trick is that your variable must contain the entire WHERE clause, i.e. "WHERE col3 in (1,2,3,4)"
&lt;BR /&gt;Speaking of IN clauses, if you need to set the predicate values dynamically (say you are reading them from a file, or looking them up from another table) a neat trick is to aggregate your predicate values with tAggregateRow using the "list" function. Use a tMap to surround your values list with the rest of the WHERE clause.
&lt;BR /&gt;My 2 cents on context vars vs. globalMap vars: Context vars for "public" job parameters, globalMap vars for internal "private" global variables.</description>
      <pubDate>Sat, 08 Sep 2012 03:02:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203969#M5044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-08T03:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203970#M5045</link>
      <description>Hi All
&lt;BR /&gt;I can use variable in dynamic query now
&lt;BR /&gt;Problem I don't know how to run job with different values of parameter
&lt;BR /&gt;I can do it manually by swithcin contexts manually
&lt;BR /&gt;I need now to run job with parameter 4 times
&lt;BR /&gt;1,2,3,4 in automatic way (not manually) in sequence
&lt;BR /&gt;: 
&lt;BR /&gt;job1 with par = 1
&lt;BR /&gt;job1 with par = 2
&lt;BR /&gt;job1 with par = 3 ....
&lt;BR /&gt;
&lt;BR /&gt;Seems I need some parent job
&lt;BR /&gt;May be Prejob is what I needs - but I can't undesrtand how to use it 
&lt;BR /&gt;ps I read docs - sure there is info but can't find it
&lt;BR /&gt;Any references also will be apreciated</description>
      <pubDate>Wed, 19 Sep 2012 14:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203970#M5045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-19T14:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203971#M5046</link>
      <description>You should start a new topic but what's the source for your four conditions?</description>
      <pubDate>Fri, 21 Sep 2012 07:35:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203971#M5046</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2012-09-21T07:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203972#M5047</link>
      <description>Hi Alevy - this is continuation of problem
&lt;BR /&gt;I just need to run job with parameters many times 
&lt;BR /&gt;job1 with par = 1 then , job1 with par = 2 , job1 with par = 56 ....
&lt;BR /&gt;
&lt;BR /&gt;I can set globalMap.put("par1" , "value1") in job
&lt;BR /&gt;but don't understand how to pass it it Child job
&lt;BR /&gt;or how to use context vars for that
&lt;BR /&gt;I found how I can change them manually (set 2 contexts and change default one in job)
&lt;BR /&gt;but I need to run Same job in programm way
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;Or may be I can change context vars in jobs ?</description>
      <pubDate>Fri, 21 Sep 2012 15:31:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203972#M5047</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-21T15:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203973#M5048</link>
      <description>Use tJava to set context value.</description>
      <pubDate>Fri, 21 Sep 2012 15:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203973#M5048</guid>
      <dc:creator>janhess</dc:creator>
      <dc:date>2012-09-21T15:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203974#M5049</link>
      <description>"Problem I don't know how to run job with different values of parameter"
&lt;BR /&gt;myjob.bat --context_param whereClause="where col1=6"
&lt;BR /&gt;myjob.bat --context_param whereClause="where col1=4"
&lt;BR /&gt;etc...</description>
      <pubDate>Fri, 21 Sep 2012 16:17:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203974#M5049</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-21T16:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Parameters in job for use in SQL query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203975#M5050</link>
      <description>Great Thanks for answers&lt;BR /&gt;yes now I need TJava&lt;BR /&gt;in future may be I ll need run outside</description>
      <pubDate>Tue, 25 Sep 2012 10:01:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Parameters-in-job-for-use-in-SQL-query/m-p/2203975#M5050</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-09-25T10:01:21Z</dc:date>
    </item>
  </channel>
</rss>

