Abort job on duplicates and not update output file

Highlighted
Four Stars

Abort job on duplicates and not update output file

Hi,

I have the below logic to be built in talend.

I have a file that is updated on monthly basics. There are 4 fields that need to be unique. if a duplicate entry is found for these 4 fields, the load to output file should not occur.and it should throw an error.

I tried to do this by using below logic.pic.png

so once the input file is loaded, the tsortrow and the tuniquerow will check for unique values. if there are duplicates the job will throw error(which it does).but the uniquevalue csv output file should not be updated in case of any error. It should only get updated, if there is no error (or duplicate record). 

How should i do it? i tried to on component ok, but it doesnt give me that option.

Highlighted
Moderator

Re: Abort job on duplicates and not update output file

Hello,

Please your job requirement description, the "RunIf" trigger would be helpful for you. It can trigger a subjob or component in case the condition defined is met.

To make it clear, I have designed a demo job for you. Hope it helps.

1.png

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
Employee

Re: Abort job on duplicates and not update output file

@kavh

 

     I believe this is a duplicate post of the same scenario mentioned in your another post (link below)

 

https://community.talend.com/t5/Design-and-Development/abort-job-when-duplicates-are-found/m-p/13825...

 

     Could you please mark both topics as resolved since solution has been provided for both of them? It will help to enrich the Talend community and if another community member is getting similar issue, he/she can easily go to a post which has a solution available.

 

     Happy programming in Talend :-)

 

Warm Regards,

 

Nikhil Thampi

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog