Hi, I have a situation when I have to abort the job when the duplicates are found and not load it to output file.
I have below logic:
In case duplicates are found, the job dies. but in case there are no duplicates, the job doesnt load the output file. I pass a dummy variable on tfixedflowinput(which i think i m doing wrong), as it doesnt update the file with 4 fields from source. how to do it..? Thanks!
it is better to make use of the after variables of the tUniqRow which tells the number of uniques and number of duplicates found from input , you can keep the uniques in temporary and update only if the number of duplicates are zero, and yes tFixFlowInput would not work that way
@CK395, can u give export of this job?
when i do IF, it doesnt give me option of tdie. is there anything special u did..? Neither do i get option for thashinput & thashoutput
Here is an alternate option to resolve your problem. Add a context variable "row_count" in integer format.
The tjava component connected to On Subjob Ok is dummy. The if component connected to tDie is :-
and the if condition connected to the next flow will be having the condition
I didn't notice that earlier skeleton diagram was missing the data capture of unique records.
You can store the unique records in a format of your choice (either as file or hash) and read them later for downstream processing.
If the answer has helped to answer your query, please mark the topic as resolved. Kudos are also welcome :-)
my bad i didn't see the choose files button earlier,
Anyways, the job is attached, make sure to change the file paths and configure components according to your schema.
let me know if it fulfilled your requirement or not.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Look at6 ways to start utilizing Machine Learning with Amazon We Services and Talend