<?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: Looping through a list of Table Names and selecting from each table in the list in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288910#M62329</link>
    <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not using the Open Source Studio. I am using a Licenced version: 6.1.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2018 18:40:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-02-23T18:40:02Z</dc:date>
    <item>
      <title>Looping through a list of Table Names and selecting from each table in the list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288908#M62327</link>
      <description>&lt;DIV&gt;
  Dear All 
&lt;/DIV&gt; 
&lt;DIV&gt;
  &amp;nbsp; 
&lt;/DIV&gt; 
&lt;DIV&gt;
  I am trying to create a Job that when executed, dynamically select from a static list of table names, iterate through the list and for each table name, it will perform a 'SELECT * FROM &amp;lt;Table Name&amp;gt; and then insert the select rows into another table of the same name in another database. 
&lt;/DIV&gt; 
&lt;DIV&gt;
  &amp;nbsp; 
&lt;/DIV&gt; 
&lt;DIV&gt; 
 &lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image1.png" style="width: 916px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsXu.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154691i50C20E0D2BF970C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsXu.png" alt="0683p000009LsXu.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt; 
&lt;/DIV&gt; 
&lt;DIV&gt;
  &amp;nbsp; 
&lt;/DIV&gt; 
&lt;DIV&gt;
  The Specify Table List which is a 'tFixedFlowInput' component has a static list of table: 
&lt;/DIV&gt; 
&lt;DIV&gt;
  &amp;nbsp; 
&lt;/DIV&gt; 
&lt;DIV&gt; 
 &lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image2.png" style="width: 547px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsNH.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147559iAB5266A66500E0A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsNH.png" alt="0683p000009LsNH.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt; 
&lt;/DIV&gt; 
&lt;P&gt;The schema (row1) that is passed between tFixedFlowInput and tFlowToIterate components is row1.tableName, which carries the name of the table in the list.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The next component in the flow will iterate through the list and pass the table name to the next component which is a tDB2Input and this will perform a 'SELECT * FROM...' the table name that comes from the iterator.&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="image3.png" style="width: 706px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LseF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138527i41116CEA42EB51E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LseF.png" alt="0683p000009LseF.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The last component in the flow is the insertion into the target Database which is a tMSSqlOutput component and this will create the selected rows.&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="image4.png" style="width: 685px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LsMF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/148259i598FBD0615664D95/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LsMF.png" alt="0683p000009LsMF.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So I have the following questions:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;1. How do I define a dynamic schema in the 'tDB2Input' component. Obvioulsy I do not know or can specify the schema at design time. I want the component to derive the schema name based on the table that it selects from ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2. Can I specify 'row1.tableName' in the tMSSqlOutput component ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Appreciate your help&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Patrice&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 17:43:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288908#M62327</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T17:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through a list of Table Names and selecting from each table in the list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288909#M62328</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;1- No dynamic schema with open source version.&lt;/P&gt;
&lt;P&gt;2- As you have a tFlowToIterate, it's preferable to use the global variable created by this component.&lt;/P&gt;
&lt;P&gt;You can retrieve the tablename using:&lt;/P&gt;
&lt;PRE&gt;(String)globalMap.get("row1.tableName") // or an other name depending on the settings for tFlowToIterate&lt;/PRE&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 18:04:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288909#M62328</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-02-23T18:04:06Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through a list of Table Names and selecting from each table in the list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288910#M62329</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not using the Open Source Studio. I am using a Licenced version: 6.1.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 18:40:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288910#M62329</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T18:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through a list of Table Names and selecting from each table in the list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288911#M62330</link>
      <description>No access to the licensed version at this time. Unable to complete my answer.</description>
      <pubDate>Fri, 23 Feb 2018 19:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288911#M62330</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-02-23T19:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through a list of Table Names and selecting from each table in the list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288912#M62331</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;P&gt;1. How do I define a dynamic schema in the 'tDB2Input' component. Obvioulsy I do not know or can specify the schema at design time. I want the component to derive the schema name based on the table that it selects from ?&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;P&gt;2. Can I specify 'row1.tableName' in the tMSSqlOutput component ?&lt;/P&gt; 
 &lt;P&gt;&amp;nbsp;&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;1) Just select a Built-In schema in the tDB2Input component and then create a single&amp;nbsp;column with a type of "Dynamic" for that. Then for the tMSSqlOutput component, do the same.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2) I don't believe you can specify row1.tableName in the tMSSqlOutput component's table name field. BUT you&amp;nbsp;CAN use ((String)globalMap.get("row1.tableName")). This globalMap is set during the iteration, which is before the subjob containing the tMSSqlOutput component. Parameters like filenames and table names need to be in place before the component is first initialised in many cases.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You might also want to consider whether the tables already exist in your output database. If they don't then you will have to use "Create table if does not exist" in your output component's "Action on table" option.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 23:03:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288912#M62331</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T23:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through a list of Table Names and selecting from each table in the list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288913#M62332</link>
      <description>&lt;P&gt;Thanks Rob. That worked... &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MApQ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143843iD05D3D69B884B2AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MApQ.png" alt="0683p000009MApQ.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 11:44:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288913#M62332</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-26T11:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through a list of Table Names and selecting from each table in the list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288914#M62333</link>
      <description>&lt;P&gt;I have to perform a similar task. Where I need to loop through a list of tables in the same DB in SQL Server and output them to a MYSQL DB.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering why a "contexts." were added to the DB Information in the Input. Do I need to make a Contexts for this Sort of Job? Also what value does the Schema need in the input to perform this type of iteration,you mentioned "Dynamic" not sure if that is a datatype or an actual value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 18:49:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288914#M62333</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T18:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Looping through a list of Table Names and selecting from each table in the list</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288915#M62334</link>
      <description>&lt;P&gt;I have to perform a similar task. Where I need to loop through a list of tables in the same DB in SQL Server and output them to a MYSQL DB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was wondering why a "contexts." were added to the DB Information in the Input. Do I need to make a Contexts for this Sort of Job? Also what value does the Schema need in the input to perform this type of iteration,you mentioned "Dynamic" not sure if that is a datatype or an actual value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Help would be greatly appreciated,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Andrew&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 18:50:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Looping-through-a-list-of-Table-Names-and-selecting-from-each/m-p/2288915#M62334</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T18:50:56Z</dc:date>
    </item>
  </channel>
</rss>

