Page 1 of 1

Dataset schema is disordered

Posted: Thu May 27, 2010 7:15 pm
by jseclen
Hi Forum,

I'm using a virtual machine running Linux and my job is reading a
sequential file as bulk, one field defined as varchar (1000), and
parsing the fields with column import stage. The next stage is a
Transformer and finally write in a dataset.

The parsing convert the input field in 3 new fields, including the
original column (property Keep Import Column = Yes) and the transformer
complete the final structure (8 columns) with other functions
(string and numeric).

The final structure is:

OrderNum
RecType
Name
OrderDate
ProductID
Qty
RecordNum
RecIn

When i run the job is finished ok and i can view the dataset result
in the viewer, but when use the "Dataset Management" and shown the
schema, the fields are disordered

Name
OrderDate
ProductID
Qty
RecordNum
OrderNum
RecType
RecIn

this behavior is normal?? or there is an error in the dataset definition??

Posted: Thu May 27, 2010 7:25 pm
by ray.wurlod
It's normal (optimized) and it's standard across most databases - you do not control the order in which the database server decides to store columns. Most, in my experience, try to put the fixed-length ones first and the variable-length ones later. In rare cases this can be tunable.

Posted: Fri May 28, 2010 7:21 am
by jseclen
Thanks Ray,

this always happening? because in other jobs the structure is the same in both places, in the dataset management and the dataset column tab.

some explanation? :cry:

Posted: Sat May 29, 2010 3:49 am
by ray.wurlod
No explanation - DataStage does as it pleases with column order, for various reasons ostensibly related to optimization. The same thing can - and often does - occur with Peek stage.