Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tOracleOutput multi column primary key

Hello, i have one problem. I use in my project tOracleOutput. In my table I dont have primary key. But i want use in talend job multi column primary key. When i check (in tOracleOutput-Advanced settings-Use field options) checkbox only in one row (update) that is work fine, but when i check more rows, that ignore them and insert new rows.....can u help me with this ???
I use talend openstudio 6.2.1 and in tOracleOutput-Action on data i try both - "Insert or update" and "Update or insert"

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I found what was wrong, its my fault. In my schemas I have START_DATETIME and END_DATETIME as Date but in DB it is VARCHAR2...
After change, its working and dont insert duplicated values 0683p000009MACn.png
Thanks you boys 

View solution in original post

11 Replies
Anonymous
Not applicable
Author

Can you give an example of what you are seeing in data? If you have 5 columns (colA, colB, colC, colD and colE) and have your composite key on colA, colB, and colC, you would tick the corresponding tick boxes for update key in the field options box. If colA, colB and colC hold A B C in the first row of data and you have insert or update, then the row will be inserted. If A B C is in the second row, then the record will be updated. If A D C is in the third row, then the record will be inserted, and if A D C is in the fourth row, it will cause an update. 

 

Where is yours going wrong?

Anonymous
Not applicable
Author

Hellou my example is
I have 5 columns (colA, colB, colC, colD and colE), I checked box (key in field options) for columns colA, colB, colC, colD
Table is empty and I insert row with values A B C D X, its all right row was inserted.
Nexttime I insert row with values (A B C D Z) but it was inserted too (with both option "Insert or update" and "Update or insert").
Why was second row added when he have same values A B C D ???

Anonymous
Not applicable
Author

This is very strange. Your expectations sound correct. Can you give us a screenshot of your configuration? 

Anonymous
Not applicable
Author

That`s my configuration. 
After running, job create duplicty rows.

0683p000009Lscj.png0683p000009Lsqb.png0683p000009LsqW.png

manodwhb
Champion II
Champion II

do you marked Key for those key columns in Schema of tOracleouput?

Anonymous
Not applicable
Author

Can you show us the data you are seeing this issue with? Your config looks OK. It is looking like it *could* be a bug. I'd need to see your input and output data examples before I am sure of this. For example, are you sure the data is exactly the same (no rogue characters, spaces, etc?) What version of Talend are you using? 

Anonymous
Not applicable
Author

Yes i have it marked as key in tOracle schema

Anonymous
Not applicable
Author

no spaces and etc.
1 col LINE_NAME is string val PSF01

2 col START_DATETIME VARCHAR2 val 05-FEB-18
3 col END_DATETIME VARCHAR2 val 05-FEB-18
4 col UNIT INTEGER val 306
5 col MODEL_NAME VARCHAR2 val CUH-XXXXAA01W
6 col CREATE_TIME DATE val 2018/02/05 07:33:20 AM
values are same as input data, and in table I have duplicities

manodwhb
Champion II
Champion II

can you show tmap and why you have checked to Updatable for key columns?