Reading Fileset with Schema Def

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
altruist
Participant
Posts: 73
Joined: Thu May 11, 2006 6:50 am

Reading Fileset with Schema Def

Post by altruist »

Hi All,

I am trying to create a generic job of reading data from fileset and dumping it to dataset.

I have the fileset manually created as below:

Code: Select all

ServerNm:/PathName/fileset.fs
ServerNm:record (final_delim=none, delim=none, quote=null, ascii)
ServerNm:( Field1 : String(10) ;
Field2: String(20);
ServerNm:)
I have also tried

Code: Select all

ServerNm:/PathName/fileset.fs
record (final_delim=none, delim=none, quote=null, ascii)
( Field1 : String(10) ;
Field2: String(20);
)
But I keep getting the error "Schema must be set in APT_FileImportOperator". I am unable to obtain information regarding this from IBM docs. Can anyone shed light on this?

The Fileset is working if I have the column definitions in job and fileset defined in unix as below:

Code: Select all

ServerNm:/PathName/fileset.fs
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

How have you defined where the data files ("segment files") of the File Set are?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
altruist
Participant
Posts: 73
Joined: Thu May 11, 2006 6:50 am

Post by altruist »

Hi Ray,

I am sorry.. I made slight mistake in the code that I have sent earlier.

I have only one data file as of right now for testing.

I am able to read the fileset if I add the column definitions in job and remove the schema definition in the fileset. Once I use the below entries for Fileset and enable the stage to choose schema from Fileset, I get the error - "Schema must be set in APT_FileImportOperator"

Code: Select all

ServerNm:/PathName/SeqFile.sf
ServerNm:record (final_delim=none, delim=none, quote=null, ascii) 
ServerNm:( Field1 : String(10) ; 
Field2: String(20); 
ServerNm:)

Code: Select all

ServerNm:/PathName/SeqFile.sf
record (final_delim=none, delim=none, quote=null, ascii) 
( Field1 : String(10) ; 
Field2: String(20);) 
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you using a Sequential File stage or a File Set stage to read this File Set? Are you specifying the Schema File property correctly?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
altruist
Participant
Posts: 73
Joined: Thu May 11, 2006 6:50 am

Post by altruist »

I am using FileSet Stage to read the File set. I have set the following parameter "Use Schema defined in File Set=True"
altruist
Participant
Posts: 73
Joined: Thu May 11, 2006 6:50 am

Post by altruist »

Hi Ray,

Do you need any additional information from my side?


Thanks
Post Reply