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

How to check if a record Exists in DB

I have a folder of excel files
Talend package reads the folder and for each excel file in the folder it unpivots the content of the excel file and inserts in a MSSQL database.
Now the same row/record could exist in multiple files and thats why we keep getting duplicates in the database.
if someone could help me understand, if there is a way to check if the record exists in MSSQL DB, before inserting then i can skip duplicates and just get unique records. Please see the attached screenshot.
Thanks
Labels (2)
12 Replies
Anonymous
Not applicable
Author

You can dump the data from all the excel files in 1 table. Post that you can only move unique or latest records in your actual table.
mmctony
Contributor
Contributor

Hi,

I have to perform "insert if not exist" into tables that don't have any primary key. I cannot edit database tables' definition in order to add primary keys.

If I manually set primary key fields in the schema retrieved by Talend, will Talend be able to avoid creating duplicates of existing rows then?

 

Thanks for your help,

Mick

Anonymous
Not applicable
Author

Hello,

We can add a combobox called ACTION on the tDBOutput component.

ACTION properties will be "INSERT", "UPDATE", "INSERT OR UPDATE" or "UPDATE OR INSERT".

"INSERT OR UPDATE" means if the insertion failed, update operation will be perform.

Best regards

Sabrina