Page 1 of 1

Rejecting bad records from sequential file

Posted: Tue Sep 29, 2015 10:57 pm
by udayanguha
Hi,
I have a sequential file stage which reads data from a file and propagates it further to the next stage. The problem is that my job fails whenever there's a bad record in the file (like metadata mismatch, different record type in file from the metadata). Is there a way I can reject bad records and let the good records flow to the next stage. I don't want to handle these bad records in next transformer stage, just want to reject these records in the sequential file stage itself (while reading the records).

Posted: Wed Sep 30, 2015 2:34 am
by Thomas.B
If your stage fails when a bad record is read by the sequential file stage, the option 'Reject mode' must be set on 'Fail'.
Just change it to 'Continue' or 'Output' if you want to redirect them to a reject link and your job will process only with the good records.

Posted: Wed Sep 30, 2015 8:17 am
by udayanguha
Hi Thomas,
Thanks for the reply. I do not have access to DS right now so I can't check so just a small question. Can I use the reject property of sequential file stage even when I am using the stage as a source stage. I mean, can there be a reject link while reading from a file or a reject link works while the records are being written into a sequencial file.

Posted: Wed Sep 30, 2015 8:57 am
by chulett
Yes, it can have a reject link as a source or a target.

Posted: Thu Oct 01, 2015 9:22 am
by udayanguha
Got my DS access today and the reject link works fine for me. Thanks all for the help.