SQL Type (Meta-data columns definition)

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
luca
Participant
Posts: 81
Joined: Wed May 14, 2003 11:34 pm

SQL Type (Meta-data columns definition)

Post by luca »

Hi !
I would like to have some light on the "SQL Type" that defines the type for each column (ex: in a transformer).
What are the rules to follow up to avoid problems?
ex: is the following ok: input=numeric, output=decimal ?
When can we get errors due to mismatch types?
When is a conversion mandatory?
...
Thanks
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Hi Luca,

best way to solve is to be 100 % correct. If the database accepts the difference even a char on the one side and a numeric on the other work.

Some stage are strict. With ODBC you get for any difference even for char(4) vs. char(8) an error, some other stages accept difference without getting angry.

Try it and you know it.

Wolfgang
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Luca

When you use a sql type other than varchar then DataStage converts the field to that type internally. There is some overhead for this. When you are not doing math with a field then use varchar on both ends (input and output). This is the fastest. What is decimal is numeric in another database. This gets really different on plugins. All these types are used by DataStage to intrepret the column. Most are unimportant to DataStage. You can even do math with varchar fields without converting them. Dates are a little different.

Thanks Kim.


Kim Duke
DwNav - ETL Navigator
www.Duke-Consulting.com
Post Reply