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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Check if row is inserted or updated

Hi,
I make a job for read a txt file and write a mysql table.
I want write a log line for each row inserted and each row updated.
I know how write the number of total row with NB_LINE_INSERTED but i want the details of row inserted.
Thx
Labels (2)
4 Replies
Anonymous
Not applicable
Author

Hi,
i want the details of row inserted

Are you referring to Traces debug mode?
TalendHelpCenter:How to run a Job in Traces Debug mode
Best regards
Sabrina
Anonymous
Not applicable
Author

Debug mode is not useful for my job.
I want write in log file whats is updated or inserted for further analisys and for re-launch the job with only the rows not inserted or updated
Thanks
Anonymous
Not applicable
Author

Hi Saxmor,
Do you let the t{database}Output component decide whether to Insert or Update? If so, then this will not be a case of simply switching on a parameter. What you are asking is a pretty unusual requirement as logging the action of each row being Inserted or Updated will massively impeded the performance, unless you do it in a clever way. For example, do you have control over the structure of the table being imported into? If so, can you add a an insertDate and updateDate column? Also, does a key that exists in your flat file exist in your db table? With this, you can add a time stamp of when your data was inserted or updated (identifying the Insert or Update for each row for that run) and then you can link back to your original data file using the key. The insertDate and updateDate columns can be set to only be written to if the record is inserted (for insertDate) or updated (for updateDate) using the Advanced settings of the t{database}Output component.
Talend does not provide an option to solve this problem "out of the box", but you can work one in quite easily, as described above
Regards
Richard
Anonymous
Not applicable
Author

Thanks for the reply.
Maybe it's a solution, now i try 0683p000009MA9p.png