<?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: Read tables with same structure from different DB and create one joining all the inputs in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303600#M75461</link>
    <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;Are all DB connection information the same except database name?  If so, I think you can write each database name on tForEach component and then iterate each database name, the job looks like: (take Mysql database for exxample)&lt;/P&gt;&lt;P&gt;tForEach--iterate--tMysqlInput--main--tUnite---tMysqlOutput&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on tMysqlInput, set the database field with global variable:&lt;/P&gt;&lt;P&gt;((String)globalMap.get("tForeach_1_CURRENT_VALUE"))&lt;/P&gt;&lt;P&gt;tUnite: merge all the output from each database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Oct 2020 05:41:16 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-10-30T05:41:16Z</dc:date>
    <item>
      <title>Read tables with same structure from different DB and create one joining all the inputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303599#M75460</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I´m trying to read 5 tables from DB1, DB2, DB3, DB4 and DB5.&lt;/P&gt;&lt;P&gt;All the tables are called with the same name AND all of them have the same structure&lt;/P&gt;&lt;P&gt;The output will be 1 table with all the content of the 5 input tables.&lt;/P&gt;&lt;P&gt;Can anyone help me, please?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 01:12:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303599#M75460</guid>
      <dc:creator>FGuijarro</dc:creator>
      <dc:date>2024-11-16T01:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Read tables with same structure from different DB and create one joining all the inputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303600#M75461</link>
      <description>&lt;P&gt;Hi  &lt;/P&gt;&lt;P&gt;Are all DB connection information the same except database name?  If so, I think you can write each database name on tForEach component and then iterate each database name, the job looks like: (take Mysql database for exxample)&lt;/P&gt;&lt;P&gt;tForEach--iterate--tMysqlInput--main--tUnite---tMysqlOutput&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on tMysqlInput, set the database field with global variable:&lt;/P&gt;&lt;P&gt;((String)globalMap.get("tForeach_1_CURRENT_VALUE"))&lt;/P&gt;&lt;P&gt;tUnite: merge all the output from each database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 05:41:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303600#M75461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-10-30T05:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Read tables with same structure from different DB and create one joining all the inputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303601#M75462</link>
      <description>&lt;P&gt;Hi Shong,&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;Definetly it worked!! &lt;/P&gt;&lt;P&gt;I just have an issue because it seems there are some repeated records in the 5 table readed from the diferent databases with same primary key. So after run it, I received message &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;[statistics] connected&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;(conn=453) Duplicate entry '3510' for key 'PRIMARY'&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;(conn=453) Duplicate entry '488' for key 'PRIMARY'&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;(conn=453) Duplicate entry '486' for key 'PRIMARY'&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;[statistics] disconnected&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Query used in tDBInput is:&lt;/P&gt;&lt;P&gt;"SELECT&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;`venta`.`id`,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;`venta`.`cliente`,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;`venta`.`fecha_exp`,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;`venta`.`operacion`,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;`venta`.`codigo_servicio`&lt;/P&gt;&lt;P&gt;FROM `venta`"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And database field contents: ((String)globalMap.get("tForeach_1_CURRENT_VALUE"))&lt;/P&gt;&lt;P&gt;Is there any option to copy every single row from the 5 tables (one from one different DB) although primary key could be the same in table_1 than in table_2?&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 10:41:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303601#M75462</guid>
      <dc:creator>FGuijarro</dc:creator>
      <dc:date>2020-10-30T10:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read tables with same structure from different DB and create one joining all the inputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303602#M75463</link>
      <description>&lt;P&gt;I think the error occurs when you trying to insert duplicated entry into target database, if you don't want this error, you can filter the duplicated records before inserting. &lt;/P&gt;&lt;P&gt;tForEach--iterate--tMysqlInput--main--tUnite--tUniqRow-tMysqlOutput&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 07:36:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303602#M75463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-02T07:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Read tables with same structure from different DB and create one joining all the inputs</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303603#M75464</link>
      <description>&lt;P&gt;Hi Shong,&lt;/P&gt;&lt;P&gt;Thanks for your answer. I checked records and DB had duplicated records by the end of each month so it would be a great idea to add an ammount to the first id of the next month for not to repeat ids when changing month.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 12:44:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Read-tables-with-same-structure-from-different-DB-and-create-one/m-p/2303603#M75464</guid>
      <dc:creator>FGuijarro</dc:creator>
      <dc:date>2020-11-02T12:44:25Z</dc:date>
    </item>
  </channel>
</rss>

