Bad records get rejected in sequential file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajendharreddy
Participant
Posts: 46
Joined: Tue Aug 21, 2007 5:39 am
Location: Bangalore, India

Bad records get rejected in sequential file

Post by rajendharreddy »

Hi,

I have some data. Following is sample data.

A|B|C --> First line is column header
10|24|35
4|8|NA
98|23|NA
25|83|17

In above sample data all 3 columns are INTEGER datatype. But C column is having NA records.

When I read these data through sequential file stage the bad records get rejected (i.e. NA records) automatically. I do not want to reject these bad records. I want to pass these bad records through a Transformer stage so that I will load NA records with 0 value.

In DS7.5 all the records will be passed to Transformer. Is there any work around for this.

Can anybody help me on this.

Thanks..
uppalapati2003
Participant
Posts: 70
Joined: Thu Nov 09, 2006 2:14 am

Re: Bad records get rejected in sequential file

Post by uppalapati2003 »

Hi Raj,

can you read C column as Char.

rajendharreddy wrote:Hi,

I have some data. Following is sample data.

A|B|C --> First line is column header
10|24|35
4|8|NA
98|23|NA
25|83|17

In above sample data all 3 columns are INTEGER datatype. But C column is having NA records.

When I read these data through sequential file stage the bad records get rejected (i.e. NA records) automatically. I do not want to reject these bad records. I want to pass these bad records through a Transformer stage so that I will load NA records with 0 value.

In DS7.5 all the records will be passed to Transformer. Is there any work around for this.

Can anybody help me on this.

Thanks..
Srini
uppalapati2003
Participant
Posts: 70
Joined: Thu Nov 09, 2006 2:14 am

Re: Bad records get rejected in sequential file

Post by uppalapati2003 »

Hi ,

Make all the input columns as Char.


rajendharreddy wrote:Hi,


I have some data. Following is sample data.

A|B|C --> First line is column header
10|24|35
4|8|NA
98|23|NA
25|83|17

In above sample data all 3 columns are INTEGER datatype. But C column is having NA records.

When I read these data through sequential file stage the bad records get rejected (i.e. NA records) automatically. I do not want to reject these bad records. I want to pass these bad records through a Transformer stage so that I will load NA records with 0 value.

In DS7.5 all the records will be passed to Transformer. Is there any work around for this.

Can anybody help me on this.

Thanks..
Srini
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Set the default value of the column to "0" in the column attributes on the sequential stage and the problem will also take care of itself. I personally prefer to use the suggestion of using a VarChar column and explicitly changing the value, but defaulting is quicker and simpler, just not as transparent.
Post Reply