Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

Insert Update without primary key (or, why else wouldn't this be working?)

$
0
0
I am working on a data sync transformation that will be run on demand by an end user. It has to be "polished".

One of the steps is to update some preferences - that populate a dropdown list - based on what's in the source database. The target database has it's own selectable options table the data is being updated/inserted into, and gets it's own primary key when saved. So, the source data contains:

ID, Label

which maps to the target database as:

value, label

yet the full set of columns in the target database is:

id, value, label, description, setting1, setting2, setting3, etc.

The update/insert is failing and the kettle failure messages are typically unhelpful ("Errors Detected!"). I have the Update/Insert configured as:

lookup keys:
value = ID

I think I am telling it to find a record in the table that matches where value in target is equal to the ID from the source database. These values are unique so this should work.

I then have the update fields configured as:

label = Label, Update = Y
value = ID, Update = Y

But this fails. Supposing that values need to be supplied for all the columns in the target database, I tried it as well with dummy values supplied by the Add Constants step, mapping those columns to appropriate values. That still fails. I am left to think that the target primary key (which isn't known in the source database) is needed to successfully update the record? I am guessing here. Any help appreciated.

Viewing all articles
Browse latest Browse all 16689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>