<?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 Run sql query from text file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270509#M48391</link>
    <description>&lt;P&gt;How can we pass sql query using text file and load sql query output in output file ?&lt;/P&gt;&lt;P&gt;I have tried by storing query in context and then called that context in tOracleinput but it is throwing some error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception in component tOracleInput_1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;java.sql.SQLException: Invalid SQL type: sqlKind = UNINITIALIZED&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest what can be done to resolve the issue.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Feb 2019 08:08:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-02-18T08:08:49Z</dc:date>
    <item>
      <title>Run sql query from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270509#M48391</link>
      <description>&lt;P&gt;How can we pass sql query using text file and load sql query output in output file ?&lt;/P&gt;&lt;P&gt;I have tried by storing query in context and then called that context in tOracleinput but it is throwing some error.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception in component tOracleInput_1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;java.sql.SQLException: Invalid SQL type: sqlKind = UNINITIALIZED&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest what can be done to resolve the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 08:08:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270509#M48391</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T08:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Run sql query from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270510#M48392</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Please note that the assumption is that you are querying the table with same schema to extract the data based on query. If there is schema change, you cannot do data extraction using this method.&lt;/P&gt; 
&lt;P&gt;1) Add query and table name in the input file and read them as showing below .&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-center" image-alt="image.png" style="width: 815px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Be.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148316i21671814DD314916/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Be.png" alt="0683p000009M3Be.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2) The schema is as shown below and pass them to tFlowtoIterate&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 534px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Bj.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138093i8735D1A6BA37E339/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Bj.png" alt="0683p000009M3Bj.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The data from the tFlowtoIterate will be added to tOracleInput as shown below.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M33v.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/156873iAFB3F2F821CB7451/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M33v.png" alt="0683p000009M33v.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Provided the schema remains same, the data will be loaded to output file. If you need to load them to different files, you can pass the target file path also as additional parameter to tFLowtoIterate and add them in the file path of output file.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I hope I have answered your query &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 08:37:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270510#M48392</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T08:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Run sql query from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270511#M48393</link>
      <description>&lt;P&gt;Hi Nikhil&lt;/P&gt;&lt;P&gt;I have tried your approach to execute sql query but getting error&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception in component tOracleInput_1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;java.sql.SQLException: SQL statement to execute cannot be empty or null&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am passing valid query in text file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 10:27:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270511#M48393</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T10:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Run sql query from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270512#M48394</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Could you please print and see whether the tFlowtoIterate is having right values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;You can use a System Print inside tjava after tFlowtoiterate to see the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;It seems the value in your query variable is null or empty. Also add tlogrow in each stage to identify the exact area where data loss is happening.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt;
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 10:37:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270512#M48394</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T10:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Run sql query from text file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270513#M48395</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is giving null or blank error when i am unchecking tflowtoiterate use the default (key, value) in global variable option.&lt;/P&gt;&lt;P&gt;But when i am using this default option it is giving same error i was getting initially.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception in component tOracleInput_1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;java.sql.SQLException: Invalid SQL type: sqlKind = UNINITIALIZED&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;column name for query used is -&amp;gt;&amp;gt; dbQuery&lt;/P&gt;&lt;P&gt;Variable in toracleinput is --&amp;gt; ((String)globalMap.get("row3.dbQuery"))&lt;/P&gt;&lt;P&gt;Tell me if i am missing something.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 11:03:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Run-sql-query-from-text-file/m-p/2270513#M48395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T11:03:43Z</dc:date>
    </item>
  </channel>
</rss>

