<?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 Delete multiple tables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Delete-multiple-tables/m-p/2261632#M42359</link>
    <description>&lt;P&gt;Hello Talend Community,&lt;/P&gt; 
&lt;P&gt;I'm an absolute beginner in Talend. I have to create a job to have to:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Task1&lt;/STRONG&gt;.&lt;/U&gt;&amp;nbsp;Delete some rows from&amp;nbsp; &lt;STRONG&gt;tableNameA&lt;/STRONG&gt; which correspond to certain conditions, more precisely &lt;STRONG&gt;Status1&lt;/STRONG&gt;=xy and &lt;STRONG&gt;Status2&lt;/STRONG&gt; = tz. This is actually quiet simple since these conditions are included into the WHERE clause in the query:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;DELETE FROM TableNameA&lt;/P&gt; 
&lt;P&gt;WHERE Status1 = xy AND Status2 = tz&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The query above will delete all the rows that matches the WHERE clause, including values of a column named &lt;STRONG&gt;DeliveryId&lt;/STRONG&gt;.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Task2.&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;Drop multiple tables, said &lt;STRONG&gt;tableNameB&lt;/STRONG&gt;,&amp;nbsp; that contain the same &lt;STRONG&gt;DeliveryId&lt;/STRONG&gt; column as &lt;STRONG&gt;tableNameA&lt;/STRONG&gt;. Note that tables &lt;STRONG&gt;B&lt;/STRONG&gt; are named according to the following format: "&lt;STRONG&gt;tableNameB_xyz&lt;/STRONG&gt;", where &lt;STRONG&gt;xyz&lt;/STRONG&gt; is the &lt;STRONG&gt;DeliveryId&lt;/STRONG&gt;.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In my job I use a tFlowToIterate component linked to a tMySqlRow component in order to perform task 1, as can be seen in the attached figure.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My question is, how can I drop all the tables "&lt;STRONG&gt;tableNameB_xyz"&lt;/STRONG&gt; that match the &lt;STRONG&gt;DeliveryId&lt;/STRONG&gt; selected in Task1?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks in advance&lt;/P&gt; 
&lt;P&gt;Best Regards,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;A.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Feb 2019 13:18:37 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-02-13T13:18:37Z</dc:date>
    <item>
      <title>Delete multiple tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Delete-multiple-tables/m-p/2261632#M42359</link>
      <description>&lt;P&gt;Hello Talend Community,&lt;/P&gt; 
&lt;P&gt;I'm an absolute beginner in Talend. I have to create a job to have to:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Task1&lt;/STRONG&gt;.&lt;/U&gt;&amp;nbsp;Delete some rows from&amp;nbsp; &lt;STRONG&gt;tableNameA&lt;/STRONG&gt; which correspond to certain conditions, more precisely &lt;STRONG&gt;Status1&lt;/STRONG&gt;=xy and &lt;STRONG&gt;Status2&lt;/STRONG&gt; = tz. This is actually quiet simple since these conditions are included into the WHERE clause in the query:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;DELETE FROM TableNameA&lt;/P&gt; 
&lt;P&gt;WHERE Status1 = xy AND Status2 = tz&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The query above will delete all the rows that matches the WHERE clause, including values of a column named &lt;STRONG&gt;DeliveryId&lt;/STRONG&gt;.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Task2.&lt;/STRONG&gt;&lt;/U&gt;&amp;nbsp;Drop multiple tables, said &lt;STRONG&gt;tableNameB&lt;/STRONG&gt;,&amp;nbsp; that contain the same &lt;STRONG&gt;DeliveryId&lt;/STRONG&gt; column as &lt;STRONG&gt;tableNameA&lt;/STRONG&gt;. Note that tables &lt;STRONG&gt;B&lt;/STRONG&gt; are named according to the following format: "&lt;STRONG&gt;tableNameB_xyz&lt;/STRONG&gt;", where &lt;STRONG&gt;xyz&lt;/STRONG&gt; is the &lt;STRONG&gt;DeliveryId&lt;/STRONG&gt;.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In my job I use a tFlowToIterate component linked to a tMySqlRow component in order to perform task 1, as can be seen in the attached figure.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My question is, how can I drop all the tables "&lt;STRONG&gt;tableNameB_xyz"&lt;/STRONG&gt; that match the &lt;STRONG&gt;DeliveryId&lt;/STRONG&gt; selected in Task1?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks in advance&lt;/P&gt; 
&lt;P&gt;Best Regards,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;A.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 13:18:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Delete-multiple-tables/m-p/2261632#M42359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-13T13:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Delete multiple tables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Delete-multiple-tables/m-p/2261633#M42360</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it is not about Talend, it about database&lt;/P&gt;
&lt;P&gt;you need&amp;nbsp;add 1 more iterate level for each parent iteration&lt;/P&gt;
&lt;P&gt;use tMySQLInput for request all tables with matched name from information_schema&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dev.mysql.com/doc/refman/8.0/en/tables-table.html" target="_self" rel="nofollow noopener noreferrer"&gt;https://dev.mysql.com/doc/refman/8.0/en/tables-table.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;select TABLE_NAME from information_schema.TABLES where TABLE_NAME LIKE 'tabel_pattern'+XXX&lt;/PRE&gt;
&lt;P&gt;iterate thru resultset and use data for prepare delete statements&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 20:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Delete-multiple-tables/m-p/2261633#M42360</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2019-02-13T20:54:19Z</dc:date>
    </item>
  </channel>
</rss>

