Page 1 of 1

improper records in source files

Posted: Wed Jun 27, 2007 11:50 am
by dvpawankumar
I am having a source file with improper records.
I want to reject those records in source level itself before populating to the next stage.

I tried with the reject file at source level.The improper records are populating into the reject file.But at the same time the rejected records also populating into the next stage.

can any one help him out regarding this how to reject the records at the source level itself.

Re: improper records in source files

Posted: Wed Jun 27, 2007 12:07 pm
by lucifer_nosferatus
If your source is a sequential file and if ur using server edition, try using "Discard and warn" option in the column metadata.

Posted: Wed Jun 27, 2007 12:13 pm
by kab123
Try to use a transformer with Reject row box checked in the constraint..

Posted: Wed Jun 27, 2007 12:27 pm
by DSguru2B
Guys, this is Enterprise Edition.
What do you mean by "improper records" ? Do they have a new line character in them, or an integer field has alphabets in it?

Posted: Wed Jun 27, 2007 3:38 pm
by ray.wurlod
You can add a rejects output link to your Sequential File stage. This will capture any rows from the file that do not match the metadata specified in the record schema for the main output link.

If they are "improper" in the business rules sense, you need to detect these with your job design, most likely with expressions in the Transformer stage.

improper record format in source file

Posted: Thu Jun 28, 2007 1:23 am
by dvpawankumar
Hi ray,

Thanks for your suggestion.I did the same thing like adding rejects output to the source sequential file.The file is capturing the all reject records.But at the same time the reject records also passing to the the next stage.once the reject records are captured those should not be passed to the next stage.But the improper records also passing to the next stage.

So cold you please suggest the another way.

regards
pawan



ray.wurlod wrote:You can add a rejects output link to your Sequential File stage. This will capture any rows from the file that do not match the metadata specified in the record schema for the main output link.

If ...

improper record format in source file

Posted: Thu Jun 28, 2007 1:25 am
by dvpawankumar
Hi ray,

Thanks for your suggestion.I did the same thing like adding rejects output to the source sequential file.The file is capturing the all reject records.But at the same time the reject records also passing to the the next stage.once the reject records are captured those should not be passed to the next stage.But the improper records also passing to the next stage.

So could you please suggest the another way.

regards
pawan



ray.wurlod wrote:You can add a rejects output link to your Sequential File stage. This will capture any rows from the file that do not match the metadata specified in the record schema for the main output link.

If ...

Posted: Thu Jun 28, 2007 1:28 am
by ArndW
Your reject mode in the sequential file stage should be set to "output"

improper format records in sequential file

Posted: Thu Jun 28, 2007 1:48 am
by dvpawankumar
i did the same thing.But still the issue is same.

Could you please suggest the another logic in transformer.



ArndW wrote:Your reject mode in the sequential file stage should be set to "output" ...

improper format records in sequential file

Posted: Thu Jun 28, 2007 1:50 am
by dvpawankumar
i did the same thing.But still the issue is same.

Could you please suggest the another logic in transformer.



ArndW wrote:Your reject mode in the sequential file stage should be set to "output" ...

Posted: Thu Jun 28, 2007 4:20 am
by ray.wurlod
It is simply not possible for a rejected row also to be transmitted to the main output because, if it does not match the metadata, it can not be parsed and therefore can not be imported. Please verify - indeed, prove - your assertion, by posting the record schema and one or two sample rows.