<?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: How to run Multiple Teradata SQL Queries from a single component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323572#M93389</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOpEAAW"&gt;@ris.tan&lt;/A&gt;&amp;nbsp; - your guide has been very helpful and performed as expected.&lt;BR /&gt;&lt;BR /&gt;quick simple question -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;how can I print the query that is being transmitted from the tLoop to tDBRow?&lt;BR /&gt;for example, tLoop is passing the query that is in the first position in the array to tDBrow,&amp;nbsp;&lt;BR /&gt;I would like at this point to print: "Currently executing...[and print the query here]"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;thank you so much in advance!&lt;/P&gt;</description>
    <pubDate>Thu, 05 Sep 2019 10:20:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-09-05T10:20:25Z</dc:date>
    <item>
      <title>How to run Multiple Teradata SQL Queries from a single component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323566#M93383</link>
      <description>Hi &lt;BR /&gt;I have a specific requirement to run multiple sql queries from a tTeradataRow or tTeradataInput component. &lt;BR /&gt;everytime I run I get following exception.&lt;BR /&gt;    Only an ET or null statement is legal after a DDL Statement.&lt;BR /&gt;I tried putting ETBT statements nothing worked. &lt;BR /&gt;I read there is a way of dealing this issue is stored procedure. But tTeradata has no SP component like oracle. Can any one please help me in this. &lt;BR /&gt;Thanks,&lt;BR /&gt;Amit</description>
      <pubDate>Wed, 02 Jul 2014 20:20:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323566#M93383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-02T20:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Multiple Teradata SQL Queries from a single component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323567#M93384</link>
      <description>Hi, &lt;BR /&gt;Have you already checked document &lt;A href="https://help.talend.com/search/all?query=Executing+multiple+SQL+statements+with+one+tMysqlRow+component&amp;amp;content-lang=en" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendHelpCenter:Executing multiple SQL statements with one tMysqlRow component&lt;/A&gt;?&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Thu, 03 Jul 2014 04:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323567#M93384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-03T04:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Multiple Teradata SQL Queries from a single component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323568#M93385</link>
      <description>Thanks Sabrina,
&lt;BR /&gt;But that does not work with teradata I am still getting the ET BT error message
&lt;BR /&gt;for now I am just creating a table and then I am collecting stat on the fields of the newly created tables. 
&lt;BR /&gt;I checked JDBC Parameters for terdata I could not find any multi-statement or multi-query... 
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Amit</description>
      <pubDate>Thu, 03 Jul 2014 16:14:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323568#M93385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-03T16:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Multiple Teradata SQL Queries from a single component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323569#M93386</link>
      <description>Hi, 
&lt;BR /&gt;So far, there is no tTeradataSP component. You can open a feature jira issue on 
&lt;A href="https://jira.talendforge.org/secure/Dashboard.jspa" target="_blank" rel="nofollow noopener noreferrer"&gt;Talend Bug Tracker&lt;/A&gt;, our component developer will check it.
&lt;BR /&gt;Best regards
&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 04 Jul 2014 09:06:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323569#M93386</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-07-04T09:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Multiple Teradata SQL Queries from a single component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323570#M93387</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;I know this thread is a bit old, but wanted to give some updates on the same issue we are facing and our solution. We spent days researching and trying many different things, such as adding BT ET statements, changing JDBC parameters in our Teradata connection, changing auto-commit settings, etc. All with no luck!&lt;/P&gt; 
&lt;P&gt;Someone on my team opened a ticket in the Talend Bug Tracker and we were told that this is not a Talend bug, but rather a limitation with the Teradata JDBC driver (see ticket&amp;nbsp;&lt;A href="https://jira.talendforge.org/browse/TDI-40898" target="_blank" rel="373799 nofollow noopener noreferrer"&gt;TDI-40898&lt;/A&gt;).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here are our findings:&lt;/P&gt; 
&lt;UL&gt; 
 &lt;LI&gt;You CAN NOT execute multiple DDL queries (ex: create table, collect stats, drop table) within a single component.&lt;/LI&gt; 
 &lt;LI&gt;You CAN execute multiple DML queries (ex: Delete, insert, update) within a single component.&lt;/LI&gt; 
 &lt;LI&gt;You&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;CAN NOT&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;execute&amp;nbsp;a mix of&amp;nbsp;DDL and DML queries within a single component.&lt;/LI&gt; 
&lt;/UL&gt; 
&lt;P&gt;We have a requirement to execute&amp;nbsp;a large numbers queries consecutively in our jobs, so breaking up our queries into separate tTeradataRow components to run 1 by 1 was very cumbersome and will not work for us.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have therefore gotten creative and coded my own solution to this issue, which I hope others can copy and benefit from, as I found this very frustrating!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Here is how&amp;nbsp;my solution works:&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-inline" image-alt="2018-10-01_11-29-32.jpg" style="width: 587px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M01c.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150965i5F4D0D2F0069323B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M01c.jpg" alt="0683p000009M01c.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Step 1:&lt;BR /&gt;Query File:&lt;/STRONG&gt; Our set of SQL queries&amp;nbsp;is stored in a text file in a shared folder. All queries end with a semicolon in the file (except for the last query in the file). I read in the file using a tFileInputRaw component which will store the entire contents of the file as a long text string into a variable in the job. The variable&amp;nbsp;that will store the string by default is&amp;nbsp;&lt;STRONG&gt;row1.content.&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-10-01_11-33-44.jpg" style="width: 745px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M07t.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147891i6E01BBD4B2A363C6/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M07t.jpg" alt="0683p000009M07t.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Step 2:&lt;BR /&gt;Parse Queries:&amp;nbsp;&lt;/STRONG&gt;Next, I added a tJavaRow component with some custom Java code. You can see what the code does in my comments in the code.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.jpg" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M07y.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135349i566BA848D6655BA1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M07y.jpg" alt="0683p000009M07y.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Steps 3 - 4.&amp;nbsp;&lt;BR /&gt;Loop&lt;/STRONG&gt;: Loop through the variables and execute the teradata command for each one, passing in the query text of the current iteration into the tTeradataRow component.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.jpg" style="width: 794px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M083.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136076i0E9A4659CDBDBC41/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M083.jpg" alt="0683p000009M083.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&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-inline" image-alt="5.jpg" style="width: 914px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M02r.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130372i3B245AF7F71F3C80/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M02r.jpg" alt="0683p000009M02r.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And there you have it!&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This has proven to work very well for us. It is a shame that I had to jump through hoops and take matters into my own hands to custom code this basic functionality. Although we were told that this is a Teradata JDBC driver limitation and not a Talend bug, I don't see why Talend wouldn't program it to work behind the scenes as I have programmed above.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope someone else finds this helpful!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 17:10:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323570#M93387</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-01T17:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Multiple Teradata SQL Queries from a single component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323571#M93388</link>
      <description>Thanks 
&lt;A href="https://community.qlik.com/s/profile/0053p000007LOpEAAW"&gt;@ris.tan&lt;/A&gt;. it worked.</description>
      <pubDate>Fri, 26 Oct 2018 20:44:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323571#M93388</guid>
      <dc:creator>PranayVatsal</dc:creator>
      <dc:date>2018-10-26T20:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to run Multiple Teradata SQL Queries from a single component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323572#M93389</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LOpEAAW"&gt;@ris.tan&lt;/A&gt;&amp;nbsp; - your guide has been very helpful and performed as expected.&lt;BR /&gt;&lt;BR /&gt;quick simple question -&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;how can I print the query that is being transmitted from the tLoop to tDBRow?&lt;BR /&gt;for example, tLoop is passing the query that is in the first position in the array to tDBrow,&amp;nbsp;&lt;BR /&gt;I would like at this point to print: "Currently executing...[and print the query here]"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;thank you so much in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 10:20:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-run-Multiple-Teradata-SQL-Queries-from-a-single-component/m-p/2323572#M93389</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-09-05T10:20:25Z</dc:date>
    </item>
  </channel>
</rss>

