My name is Jaak and I am new in these forums. The problem I have is related to the “Table Comparison” transform.
The trouble is that the TC does not want to UPDATE the records in target table. It only INSERTS.
I have searched these forums and found some very useful hints, but I can’t solve my issue nevertheless…
The version of BODS I am using is v12.1.1.0 and my data flow is as follows:
Column1 (int)
Column2 (int)
Column3 (int)
Debug_ID (varchar)-- this is actually a ROW_ID from MS-SQL Database and is unique
Date_Updated -- this is sysdate()
The TARGET table DOES NOT have the primary key defined.
Now, the TC compares a row that comes from source with the specific Debug_ID.
If it DOESN’T EXIST in the target then the TC does an INSERT.
If it DOES EXIST then the TC should do an UPDATE but does INSERT again.
You should use a Map operation Transform between TC and target table in order to assign the operation to be performed based on the Operation code detected for the specified row.
Well, problem is that you are missing a primary key. Try opening your target table’s properties and checking the “use input keys” option.
Moreover, try to see how the record is flagged once out of the TC. This can be done in debug mode, where you will see records’ control flags (placed at the very left of the record).
Each record will be flagged by one among the following characters:
I = record is marked for Insert
U = record is marked for Update
D = record is marked for Delete
none = record is marked for Normal (i.e. Insert)
for further infos, go to technical manuals and look for “Table_Comparison transform”
Finally, after spending more than a week, I managed to solve it.
The aggravating circumstances were that the problem was on a system already in production and the code had been released more than a year ago. I had no slightest idea where to look at.
The root cause of the issue was that the target table (in Oracle) was configured to use BULK LOAD. After turning the bulk load off the updates started to work immediately.
Just for a side-remark: The primary key on the target is not necessary. As I wrote in my first post, the target table has a column that has unique values and BODS is happy with that.
The “use input keys” option in target table was left unchecked as well.
I checked and the bulk loading is not turned on, but the updates were not working still. Its strange cos I tried another table and the updates were working.
Any ideas? The difference between the 2 tables are that the number of columns on the one which was not working is significantly more than the the table which is working. I am stumped.