AnsweredAssumed Answered

Insert/Update function

Question asked by Rico de Feijter on Dec 12, 2017
Latest reply on Dec 14, 2017 by Gotn O'Guts

UPDATE -------------------------------------------------------------------------------------------------------------------------------------------


I now changed my workflow to the following:


However, only one row is inserted while the query in table input returns 51 rows. Could someone help me out?


/UPDATE -------------------------------------------------------------------------------------------------------------------------------------------


Dear Pentaho users,


I am using Pentaho version for data integration. I am particularly using Spoon to transfer data from SQL databases to a MySQL database. However, I am running into problems with the insert/update function. At this moment I have the following workflow:




In Table input step 2, a query is defined that yields the desired result:




Then I am using an Insert/Update function to insert or update existing rows in the mysql table, named windchill_data.




At last, the values are transferred to my mysql table. This Table output step has the following configuration:





The problem is that, each time I run the flow, rows are only inserted in the mysql database even if rows with the variantspecnumber (as defined in the query) already exist. These existing rows are then updated with the same description name and an additional set of rows with the same variantspecnumber, but different descriptions, is inserted. A similar phenomenon occurs when I use the update function instead of the insert/update function:




Rows are then only inserted instead of updated.


Could someone tell me what I am doing wrong?

Thanks in advance for the support.