Schema file error

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
har
Participant
Posts: 118
Joined: Tue Feb 17, 2004 6:23 pm
Location: cincinnati
Contact:

Schema file error

Post by har »

Hi All,
I created a small txt file with 2 fields and i created a schema file for this metadata .
And i want to read the txt file using schema file with out importing meta data.
Here is the Schema file that i created:
record
(Col1:nullable string[5];
Clo2:nullable string[5];
)
When i use this schema i get the following warning:
Field "Col1" lacks whitespace delimiter, at offset: 5 [impexp/group_comp.C:6142]
So i modified the schema with this:
record
(Col1:nullable string[5]{delim='ws', quote=double};
Clo2:nullable string[5]{delim='ws', quote=double};
)
And now i'm getting this error now:
Input buffer overrun at field "Clo2", at offset: 7 [impexp/group_comp.C:5548]
I do searched in the forum abt second error,But here i'm able to read the file when i use the meta data instead of schema of file.
Am i missing something in this schema file..
Appreciate your comments ..
Har
jdmiceli
Premium Member
Premium Member
Posts: 309
Joined: Wed Feb 22, 2006 10:03 am
Location: Urbandale, IA

Post by jdmiceli »

Just for grins, try it this way:

Code: Select all


record 
(
Col1:string[5] { delim='ws', quote=double }; 
Clo2:string[5] { delim='ws', quote=double }; 
) 

I don't know how finicky Parallel is on format of the file. I am assuming that the database defaults field definitions to nullable (if that's not the case then add it back in, though I suggest putting a space between the colon and the word 'nullable'.

Also, is this an NLS system? If so, you have to make sure the file is in UTF-8 format.

Hope that helps!
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
har
Participant
Posts: 118
Joined: Tue Feb 17, 2004 6:23 pm
Location: cincinnati
Contact:

Post by har »

Again Same error
Input buffer overrun at field "Clo2", at offset: 7 [impexp/group_comp.C:5548] .
NLS is disable in Environment.
Har
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try importing the table defintion from the file. Having done that, open the table definition in your Repository, visit the Format tab and click the button caption Sync Parallel. Then visit the Layout tab and choose Parallel option to see a record schema that will work. Use that in your schema file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
har
Participant
Posts: 118
Joined: Tue Feb 17, 2004 6:23 pm
Location: cincinnati
Contact:

Post by har »

ray,
You are the DS Guru...
Another Qucik question,when ever i use Schema file do i have to enable RCP or not.
In my test job,if i disable RCP then sequential file stage is giving error ,
i.e no column are not defiend in the stage.
With out enabling RCP,can i use schema file for meta data.
Har
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

RCP and the use of a schema file are completely independent of each other.

RCP allows the passthrough of any input column named on the output link without needing to define a derivation for it. I prefer not to use it, because it thwarts effective lineage analysis.

The Schema File property allows the column definitions to be obtained from an external schema file rather than from the Columns and Format tabs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
har
Participant
Posts: 118
Joined: Tue Feb 17, 2004 6:23 pm
Location: cincinnati
Contact:

Post by har »

Ray,
I disable RCP and i try to use schema file and try to compile,but its giving same error i.e no column are not defiend in the stage.
Wat i'm doing here is just trying to read data from sequential file using a schema file and load it to another sequential file.
Any idea wats going on here...
Har
sajarman
Participant
Posts: 41
Joined: Mon Nov 28, 2005 6:29 am

Post by sajarman »

I think you must either
i) specify the column definitions in the columns tab or
ii) specify the columns using a schema file
in the second sequential file as well.

Alternatively, you may use RCP.

Hope this helps.
Post Reply