Does Teradata API Stage Support Datatype - DATE

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
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Does Teradata API Stage Support Datatype - DATE

Post by throbinson »

Teradata API Stage - DLL teradata.so, Version 1.2.4.
DATE fields are ANSIDATE FORMAT yyyy-mm-dd.

We routinely change the Table definition metadata of any DATE field to CHAR(10) because this appears to be the only way to handle a date field via the Teradata API stage. Can be this true or are we missing something?
The teradata.pdf makes no mention of the DATE datatype being unsupported.
Is there some method that would preserve the metadata of the DATE field?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What data type do you get when you import the table definition from Teradata?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
throbinson
Charter Member
Charter Member
Posts: 299
Joined: Wed Nov 13, 2002 5:38 pm
Location: USA

Post by throbinson »

DATE!!! But no data pull is correct. It is as if DatgaStage converts it to an internal number but is using the wrong date format mask in doing so, therefore the OCONV back is not the correct date.
nishadkapadia
Charter Member
Charter Member
Posts: 47
Joined: Fri Mar 18, 2005 5:59 am

Re: Does Teradata API Stage Support Datatype - DATE

Post by nishadkapadia »

We have faced similar problem whilst reading from TD API stage with date as datatype works erratically, hence char(10) is the safest option.
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

The date in TD is internally stored as an integer so its o.k to use char(10) in the API stage to pull the data out.
P.S you can keep it as in the DS internal format. TD will convert it automatically when you insert it so no need of doing an oconv before
Teradata Certified Master V2R5
Post Reply