View Full Version : How to insert rows into a table only if its primary keys exist in another table

07-25-2008, 04:14 AM
Hi all,

I'm new to Kettle and I need help on the Update step. I have a transformation which updates a table (TableA) and inserts selected fields into another table (Table B). My problem is, I only need to insert rows into TableB whose primary key exists in TableA. Is there a way to do that? If possible, all this should be in a single transformation.

I tried using Javascript for the conditions but I can't seem to make it all work. Please help! :(


07-26-2008, 06:04 PM
Go ahead and do the lookup on table A (before UPDATE-ing, probably). The lookup step has an option "Do not pass the row idfthe lookup fails".

Will that not work for you?

07-27-2008, 10:05 PM
yes, that did the trick..
thanks very much for the help. :)