Defining 1st line as column name in the schema 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
sjordery
Premium Member
Premium Member
Posts: 202
Joined: Thu Jun 08, 2006 5:58 am

Defining 1st line as column name in the schema file.

Post by sjordery »

Hi All,

We have a generic multi instace job which is processing some files.
The input files are having different structures ,so we have used schema file to validate the meta data.

Some files come with header record(column names).
So I want to define in the schema file as first line is column name.
I checked the online manual but didnt find any option which will fit to my requeriment.

can anybody suggest is there any options to set this in the scehma file.

Thanks in advance :)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Create a job that has this property set, and inspect the generated OSH or the score. This will show how to do it.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pksahu
Participant
Posts: 29
Joined: Wed Jul 25, 2007 5:07 am

Post by pksahu »

You can use the following code to eliminate the first line as the data.....

[b]sed '1,1 d' #pSrcDir#/#pFileName# | sed -e :a -e '$d;N;1,1ba' -e 'P;D'[/b]
where you have to specify the file name in parameter....

Try out . this might solve your problem
pksahu
Participant
Posts: 29
Joined: Wed Jul 25, 2007 5:07 am

Post by pksahu »

Sorry.. use

sed '1,1 d' #pSrcDir#/#pFileName# | sed -e :a -e '$d;N;1,1ba' -e 'P;D'

where you have to specify the file name in parameter....in the fileter option of the Stage property....
Post Reply