<?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: Input to toracleinput query in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Input-to-toracleinput-query/m-p/2310533#M81656</link>
    <description>&lt;P&gt;You can do it likes this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;tfileinputpositional --&amp;gt; tFlowToIterate---iterate--&amp;gt;toracleinput --&amp;gt; tfileoutputdelimited&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The tFlowToIterate will store each row from your file in globalMap variables. The globalMap is a HashMap. These are global variables so you can use them in your tOracleInput query. For every row returned from your file, your query will fire. Each time it fires it will fire using your data from the file.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To alter the SQL wuery it is just simple Java String manipulation. For example....&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;"Select
col1,
col2,
col3,
col4
From MyTable
Where col1 = '" +((Sring)globalMap.get("row1.value")) +"'"&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;You have to be careful to get the SQL syntax right. In the above example I have assumed your data value is from a column called "value" and the that the "row" passing to the tFlowToIterate is called "row1". Notice the single quotes I have surrounded the String globalMap with. The globalMap will store your values as Objects so you will need to cast them, as I have above.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2017 15:12:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-22T15:12:04Z</dc:date>
    <item>
      <title>Input to toracleinput query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Input-to-toracleinput-query/m-p/2310532#M81655</link>
      <description>Team, I have a scenario like below, tfileinputpositional --&amp;gt; toracleinput --&amp;gt; tfileoutputdelimited The input file has a column “EMP_ID”, with various values like 100,200,300. Now I need to pass that EMP_ID that i read from the file as parameter/input to toracleinput component, where I will be having a query like below, Select * from emp where emp_id = “should come from input flow”; How to achieve the above requirement, please advise.</description>
      <pubDate>Tue, 22 Aug 2017 14:52:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Input-to-toracleinput-query/m-p/2310532#M81655</guid>
      <dc:creator>rajesh90</dc:creator>
      <dc:date>2017-08-22T14:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Input to toracleinput query</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Input-to-toracleinput-query/m-p/2310533#M81656</link>
      <description>&lt;P&gt;You can do it likes this....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;tfileinputpositional --&amp;gt; tFlowToIterate---iterate--&amp;gt;toracleinput --&amp;gt; tfileoutputdelimited&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The tFlowToIterate will store each row from your file in globalMap variables. The globalMap is a HashMap. These are global variables so you can use them in your tOracleInput query. For every row returned from your file, your query will fire. Each time it fires it will fire using your data from the file.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;To alter the SQL wuery it is just simple Java String manipulation. For example....&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;"Select
col1,
col2,
col3,
col4
From MyTable
Where col1 = '" +((Sring)globalMap.get("row1.value")) +"'"&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;You have to be careful to get the SQL syntax right. In the above example I have assumed your data value is from a column called "value" and the that the "row" passing to the tFlowToIterate is called "row1". Notice the single quotes I have surrounded the String globalMap with. The globalMap will store your values as Objects so you will need to cast them, as I have above.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 15:12:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Input-to-toracleinput-query/m-p/2310533#M81656</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-22T15:12:04Z</dc:date>
    </item>
  </channel>
</rss>

