Read flat file with multiple 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
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Read flat file with multiple columns

Post by xch2005 »

Hi,

I am trying to read a sequential file with multiple columns. The total number of columns depend on the value in first column. Then take the values from the columns and load it into Oracle tables.

Say, (as given below) if first column value is A1 there will be 5 columns or if it is A2 there always 3 columns

A1,c2,c3,c4,c5
A2,b2,b3

What would be the efficient way to read this file and load to a table

Appreciate your suggestions.

Thanks
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

Read the entire record as one single column (With the length you think will be the maximum) and route it as required in a transformer with constrains A1/A2 etc., if thats all you need to do.
Arun
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Post by xch2005 »

Thanks for the suggestion
Post Reply