<?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 insert and update from multiple join table to single table in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227463#M19055</link>
    <description>Hi Asif&lt;BR /&gt;I guess the job logic in tMap is not correct.&lt;BR /&gt;Could you show us an example? What's your input data? What's your expected data?&lt;BR /&gt;Then we can create a job for you.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
    <pubDate>Mon, 04 Jun 2012 04:10:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-06-04T04:10:54Z</dc:date>
    <item>
      <title>how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227462#M19054</link>
      <description>Hi, 
&lt;BR /&gt;Is there any way to migrate data from multiple join table to single table using insert and update operation. 
&lt;BR /&gt;Notes: 
&lt;BR /&gt;database:MSSQL 2008 R2 
&lt;BR /&gt;Sample Input Table 
&lt;BR /&gt;Table bookingCard (bookingCardId(PK), bookingCardNo,bookingStatus); 
&lt;BR /&gt;Table bookingProduct(bookingProductId(PK), bookingCardId, productGroup); 
&lt;BR /&gt;Table bookingSubProduct(bookingSubProductId(PK),bookingProductID,SalesAmount); 
&lt;BR /&gt;Sample Output Table 
&lt;BR /&gt;Table BookingReport (bookingReportId(PK), bookingCardId,bookingProductId,bookingSubProductId,productGroup,SalesAmount); 
&lt;BR /&gt; 
&lt;BR /&gt;I must use left join. Because there may be bookingCard but no product or subproduct. Update can be happened on bookingStatus, productGroup or SalesAmount. 
&lt;BR /&gt;I have spent quite a long time to do insert and update operation in a different way but failed. Specially problem appears on bookingReportId primary key. 
&lt;BR /&gt;I expect Talend can handle this situation. I hope someone can write the steps to achieve this. 
&lt;BR /&gt;Thanking you. Best regards. 
&lt;BR /&gt;Asif</description>
      <pubDate>Fri, 01 Jun 2012 19:30:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227462#M19054</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-01T19:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227463#M19055</link>
      <description>Hi Asif&lt;BR /&gt;I guess the job logic in tMap is not correct.&lt;BR /&gt;Could you show us an example? What's your input data? What's your expected data?&lt;BR /&gt;Then we can create a job for you.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Mon, 04 Jun 2012 04:10:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227463#M19055</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T04:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227464#M19056</link>
      <description>Thank you so much for your attention. 
&lt;BR /&gt;Ok, here is the example. I make it very simple. If this can be done, I hope rest I can follow. There are two input tables 1) shippingCard and 2) shippingProduct are joined(in my case 9 tables to be joined) and output table is the shippingReport table. shippingCardId field is used to join shippingProduct and shippingCard Tables. 
&lt;BR /&gt; 
&lt;B&gt;Table shippingCard&lt;/B&gt; 
&lt;BR /&gt;shippingCardId(pk);shippingCardNo;shippingStatus 
&lt;BR /&gt; 
&lt;B&gt;Table shippingProduct&lt;/B&gt; 
&lt;BR /&gt;shippingProductId(pk);shippingCardId(fk);productGroup;billingmethod; 
&lt;BR /&gt; 
&lt;B&gt;Output Table; shippingReport&lt;/B&gt; 
&lt;BR /&gt;shippingReportId(pk);shippingCardId,shippingProductId,shippingCardNo;productGroup,billingMethod; 
&lt;BR /&gt; 
&lt;B&gt;CASE1; Create shipping Card&lt;/B&gt; 
&lt;BR /&gt;shippingCardId(pk);shippingCardNo;shippingStatus 
&lt;BR /&gt;1;BC101;ACTIVE 
&lt;BR /&gt; 
&lt;B&gt;output in shippingReport Table:&lt;/B&gt; 
&lt;BR /&gt;shippingReportId;shippingCardId,shippingProductId,shippingCardNo;productGroup,billingMethod; 
&lt;BR /&gt;1;1;NULL; BC101;null;null; (insert operation in output table) 
&lt;BR /&gt; 
&lt;B&gt;CASE2; Create shipping Product &lt;/B&gt; 
&lt;BR /&gt;shippingProductId;shippingCardId;productGroup;billingmethod; 
&lt;BR /&gt;1;1;AIR;CASH 
&lt;BR /&gt; 
&lt;B&gt;Output:&lt;/B&gt; 
&lt;BR /&gt;shippingReportId;shippingCardId,shippingProductId,shippingCardNo;productGroup,billingMethod; 
&lt;BR /&gt;1;1;1; BC101;ACC;CASH (update operation in output table) 
&lt;BR /&gt; 
&lt;B&gt;CASE3 ; Create another shipping Product &lt;/B&gt; (insert operation in output table) 
&lt;BR /&gt;shippingProductId;shippingCardId;productGroup;billingmethod; 
&lt;BR /&gt;2;1;ACC;CASH 
&lt;BR /&gt; 
&lt;B&gt;Output:&lt;/B&gt; 
&lt;BR /&gt;shippingReportId;shippingCardId,shippingProductId,shippingCardNo;productGroup,billingMethod; 
&lt;BR /&gt;1;1;1; BC101;AIR;CASH 
&lt;BR /&gt;2;1;2;BC101;ACC;CASH 
&lt;BR /&gt; 
&lt;B&gt;CASE4 ; Update productGroup from CASH TO CHEQUE &lt;/B&gt; 
&lt;BR /&gt;shippingProductId;shippingCardId;productGroup;billingmethod; 
&lt;BR /&gt;2;1;ACC;CHEQUE 
&lt;BR /&gt; 
&lt;B&gt;Output:&lt;/B&gt; 
&lt;BR /&gt;shippingReportId;shippingCardId,shippingProductId,shippingCardNo;productGroup,billingMethod; 
&lt;BR /&gt;1;1;1; BC101;AIR;CASH 
&lt;BR /&gt;2;1;2;BC101;ACC;CHEQUE 
&lt;BR /&gt;Thanks. 
&lt;BR /&gt;Asif</description>
      <pubDate>Mon, 04 Jun 2012 07:39:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227464#M19056</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T07:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227465#M19057</link>
      <description>Hi 
&lt;BR /&gt;You might create a job as the following images. 
&lt;BR /&gt;Case 4: you'd better regard shippingCardId and shippingProductId as combination key for update. 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Pedro</description>
      <pubDate>Mon, 04 Jun 2012 08:00:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227465#M19057</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T08:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227466#M19058</link>
      <description>I tried you example but cannot make it work. Please see images.
&lt;BR /&gt;I have created two rows in bookingCard Table.Run the job. Successfully created two lines in shippingReport. 
&lt;BR /&gt;shippingCardId shippingCardNo shippingStatus
&lt;BR /&gt;1 BC101 ACTIVE 
&lt;BR /&gt;2 BC102 ACTIVE 
&lt;BR /&gt;
&lt;BR /&gt;Then created one line in shippingProduct. 
&lt;BR /&gt;shippingProductId shippingCardId productGroup billingMethod
&lt;BR /&gt;1 1 AIR CASH 
&lt;BR /&gt; 
&lt;BR /&gt;It generates duplicate insert error.
&lt;BR /&gt;Thanks.
&lt;BR /&gt;asif</description>
      <pubDate>Mon, 04 Jun 2012 12:08:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227466#M19058</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-04T12:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227467#M19059</link>
      <description>Hi Asif&lt;BR /&gt;The reason that you got duplicate key is because Numeric.sequence("s1",1,1) starts from 1 every time and there are some rows in your DB table already.&lt;BR /&gt;You might save the value of last primary key in DB table into a delimited file and extract it every time you run the job.&lt;BR /&gt;Numeric.sequence("s1",context.lastPK,1) &lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Tue, 05 Jun 2012 03:09:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227467#M19059</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-05T03:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227468#M19060</link>
      <description>Hello Pedro, 
&lt;BR /&gt;Would you please help , how can I add delete operation along with insert and update operation. 
&lt;BR /&gt;scenerio: 
&lt;BR /&gt;Source table has data deleted -&amp;gt; target table will also delete the same data. 
&lt;BR /&gt;FYI, at this time, our migration project job, tMap has match model-&amp;gt;Unique match, join model-&amp;gt;Inner Join and ForInsert Catch lookup inner join reject=true and ForUpdate, Catch lookup inner join reject=false. 
&lt;BR /&gt;These works fine. Now suddenly situation arises, I need to implement delete operation with this condition. What can the tmap settings. 
&lt;BR /&gt;Thanking you. 
&lt;BR /&gt;Asif</description>
      <pubDate>Fri, 20 Jul 2012 06:30:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227468#M19060</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T06:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227469#M19061</link>
      <description>Hi Asif&lt;BR /&gt;You would see the option "delete" of "Action on data" of any DB output component.&lt;BR /&gt;Plus: if you want to delete records, the table needs to have primary key.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Fri, 20 Jul 2012 06:55:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227469#M19061</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T06:55:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227470#M19062</link>
      <description>Thanks pedro.&lt;BR /&gt;But you didn't write output table property value for delete operation&lt;BR /&gt;Catch output reject = ?&lt;BR /&gt;Catch lookup inner join reject = ?&lt;BR /&gt;Thanks.&lt;BR /&gt;asif</description>
      <pubDate>Fri, 20 Jul 2012 07:17:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227470#M19062</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T07:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227471#M19063</link>
      <description>Hi Asif &lt;BR /&gt;I don't understand. &lt;BR /&gt;Let's say you want to delete data in mysql.&lt;BR /&gt;If you want to delete a record in one table, just tell tmysqlOutput the id which you want to delete.&lt;BR /&gt;Catch output reject = ?&lt;BR /&gt;Catch lookup inner join reject = ?&lt;BR /&gt;These two options depend on your own job logic.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Fri, 20 Jul 2012 07:24:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227471#M19063</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T07:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227472#M19064</link>
      <description>i am extrememly sorry. let me explain you. 
&lt;BR /&gt;I have source table and target table.I read data from target table and keep in hash. Then I have tMap where source table is main and hash is lookup. Then tMap settings inner join and unique match model. tMap output link has two mssqloutput, one for insert and one for update. For Inert I have the above logic catchlookup inner join reject=true and false for update. 
&lt;BR /&gt; 
&lt;BR /&gt;see the job design 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Targettable -&amp;gt; tHashoutput 
&lt;BR /&gt;| 
&lt;BR /&gt;| 
&lt;BR /&gt;SourceTable \ 
&lt;BR /&gt; \ 
&lt;BR /&gt; tMap ----------tmssqloutput(forInsert - catch lookup inner join reject = true) 
&lt;BR /&gt; / \ 
&lt;BR /&gt;hashInput/ \ 
&lt;BR /&gt; -------------tMssqlOutput(forUpdate - catch lookup inner join reject = false) 
&lt;BR /&gt;I wanted to know if add another link from tMap to mssqloutput for delete operation what should be the condition 
&lt;BR /&gt;catchlookup inner join reject. 
&lt;BR /&gt;Thanks. 
&lt;BR /&gt;Asif</description>
      <pubDate>Fri, 20 Jul 2012 07:45:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227472#M19064</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T07:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227473#M19065</link>
      <description>Hi Asif&lt;BR /&gt;Sorry.&lt;BR /&gt;I understand what you say above. But I don't know what data you want to delete.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Fri, 20 Jul 2012 07:53:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227473#M19065</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T07:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227474#M19066</link>
      <description>My Source and Target table both are same. Everytime data inserted or updated in the source table my etl job insert or update same data in target table migrating from source table. 
&lt;BR /&gt;So operatios are 
&lt;BR /&gt;if source table has a new record. my etl job insert the rows to the target table. 
&lt;BR /&gt;if source table has updates some fields of any rows, etl job also update fileds of target table. 
&lt;BR /&gt;I want if source table data is deleted, etl job will also delete target table rows. 
&lt;BR /&gt;Thanks again. 
&lt;BR /&gt;asif</description>
      <pubDate>Fri, 20 Jul 2012 08:03:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227474#M19066</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T08:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227475#M19067</link>
      <description>Hi Asif
&lt;BR /&gt;Got you.
&lt;BR /&gt;In fact, what you need is called Capture Data Change feature which is only supported by Talend Enterprise Edition.
&lt;BR /&gt;For TOS, what you can do is to record all the ids before they are deleted in source table.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Pedro</description>
      <pubDate>Fri, 20 Jul 2012 08:06:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227475#M19067</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T08:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227476#M19068</link>
      <description>Dear pedro, 
&lt;BR /&gt;We cannot use CDC feature now. However, I set scheduler in every five minutes and using some other logic such as last modified date of each table.Insert and update operations are fine at this moment. 
&lt;BR /&gt;Is it possible to create another job to check source table ids and target table ids and then delete those ids in target table which are not found in source table. Any idea of job settings. 
&lt;BR /&gt;Thanks. 
&lt;BR /&gt;Asif</description>
      <pubDate>Fri, 20 Jul 2012 08:49:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227476#M19068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T08:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227477#M19069</link>
      <description>Hi Asif&lt;BR /&gt;Yes. It's possible.&lt;BR /&gt;Just create a new job and do inner join with the source table and target table.&lt;BR /&gt;Then you will get the ids which have been deleted.&lt;BR /&gt;Regards,&lt;BR /&gt;Pedro</description>
      <pubDate>Fri, 20 Jul 2012 08:54:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227477#M19069</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-20T08:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to insert and update from multiple join table to single table</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227478#M19070</link>
      <description>Hi All,
&lt;BR /&gt;I m using TOS&amp;nbsp;5.6.1. I build the job with more inner join and outer join in tmap. when i m using that error table and output table data are not coming properly. please any one guide me can i get the all data with one error and main table&amp;nbsp;</description>
      <pubDate>Mon, 21 Dec 2015 04:00:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-insert-and-update-from-multiple-join-table-to-single/m-p/2227478#M19070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-21T04:00:43Z</dc:date>
    </item>
  </channel>
</rss>

