<?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: Dynamic Table names from SQL Server in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Table-names-from-SQL-Server/m-p/2214261#M11182</link>
    <description>&lt;P&gt;Hi !&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The best way for you is to use a "DBTableList" component. Then iterate on the list of table to do your transfer.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Like :&lt;/P&gt; 
&lt;P&gt;DBTableList==&amp;gt;DBInput==&amp;gt;tMap=&amp;gt;DBOutput&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The table name is a matching condition (a regex), you can use the name of the table wherever you want in the iteration process.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope it helps !&lt;/P&gt; 
&lt;P&gt;EDIT : you can even parallelize the iteration process &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2019 14:49:12 GMT</pubDate>
    <dc:creator>rmartin2</dc:creator>
    <dc:date>2019-08-27T14:49:12Z</dc:date>
    <item>
      <title>Dynamic Table names from SQL Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Table-names-from-SQL-Server/m-p/2214259#M11180</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am pretty new to Talend, I am using Talend Open Studio.&lt;/P&gt;
&lt;P&gt;We are trying to dump data from SQL server to S3&lt;/P&gt;
&lt;P&gt;We have some table names in SQL server like sales_201906 ,&amp;nbsp;sales_201907 ,&amp;nbsp;sales_201908 ...&lt;/P&gt;
&lt;P&gt;and there is a query which uses this table for example for the current month (August)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select A.col, B.col&lt;/P&gt;
&lt;P&gt;FROM&amp;nbsp;sales_201908 as A Inner join product as B&lt;/P&gt;
&lt;P&gt;on A.id=B.id&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using tb_input component we have used this query but the sales table should change dynamically based on the month and year, for example for next month query should be as below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Select A.col, B.col&lt;/P&gt;
&lt;P&gt;FROM&amp;nbsp;sales_201909 as A Inner join product as B&lt;/P&gt;
&lt;P&gt;on A.id=B.id&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I achieve this.?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Table-names-from-SQL-Server/m-p/2214259#M11180</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table names from SQL Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Table-names-from-SQL-Server/m-p/2214260#M11181</link>
      <description>first set a context value (who is ilitialized when you run the job).&lt;BR /&gt;on sql code :&lt;BR /&gt;type "Select A.col, B.col FROM sales_" + context.yourData + " as A Inner join product as B on A.id=B.id"&lt;BR /&gt;then create a new job running the first one with trujob.&lt;BR /&gt;&lt;BR /&gt;thats fine</description>
      <pubDate>Tue, 27 Aug 2019 12:43:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Table-names-from-SQL-Server/m-p/2214260#M11181</guid>
      <dc:creator>fdenis</dc:creator>
      <dc:date>2019-08-27T12:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Table names from SQL Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamic-Table-names-from-SQL-Server/m-p/2214261#M11182</link>
      <description>&lt;P&gt;Hi !&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The best way for you is to use a "DBTableList" component. Then iterate on the list of table to do your transfer.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Like :&lt;/P&gt; 
&lt;P&gt;DBTableList==&amp;gt;DBInput==&amp;gt;tMap=&amp;gt;DBOutput&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The table name is a matching condition (a regex), you can use the name of the table wherever you want in the iteration process.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Hope it helps !&lt;/P&gt; 
&lt;P&gt;EDIT : you can even parallelize the iteration process &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 14:49:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamic-Table-names-from-SQL-Server/m-p/2214261#M11182</guid>
      <dc:creator>rmartin2</dc:creator>
      <dc:date>2019-08-27T14:49:12Z</dc:date>
    </item>
  </channel>
</rss>

