Sequential file input with optional columns

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
edwds
Premium Member
Premium Member
Posts: 32
Joined: Mon May 01, 2006 1:06 pm

Sequential file input with optional columns

Post by edwds »

In a server job you could make columns in sequential files optional in the metadata (columns) tab by converting them to nulls with the "INCOMPLETE COLUMN" property. Is there an equivalent in the PX Sequential stage. I have a delimted file that has some optional columns at the end of each record.
samsuf2002
Premium Member
Premium Member
Posts: 397
Joined: Wed Apr 12, 2006 2:28 pm
Location: Tennesse

Post by samsuf2002 »

u can use SetNull() in the transformer for optional columns and make their value null
hi sam here
edwds
Premium Member
Premium Member
Posts: 32
Joined: Mon May 01, 2006 1:06 pm

Post by edwds »

I can't even get to the transformer since the Sequential file stage gives me errors on reading the source data. These optional columns at the end have no delimeters at this point. So for example record 1 could have 10 columns but record 2 has only 5. But after the fifth column there isn't any delimeters. So the sequential file stage doesn't know how to handle the record so it ignores it and doesn't even bring it in.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't think you can do it with properties. You can read the entire record as a VarChar, parsing it subsequently using a Transformer stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shepli
Participant
Posts: 79
Joined: Fri Dec 17, 2004 9:56 am

Post by shepli »

I thinnk you need to set the "INCOMPLETE COLUMN" of all the optional columns to "replace".
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please advise where to find the "Incomplete Column" property in a parallel job's Sequential File stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shepli
Participant
Posts: 79
Joined: Fri Dec 17, 2004 9:56 am

Post by shepli »

Please advise where to find the "Incomplete Column" property in a parallel job's Sequential File stage.
My fault. I thought we are talking about server jobs. Sorry, Ray.
Post Reply