Page 1 of 1

Does Teradata API Stage Support Datatype - DATE

Posted: Fri Oct 17, 2008 8:22 am
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?

Posted: Fri Oct 17, 2008 3:03 pm
by ray.wurlod
What data type do you get when you import the table definition from Teradata?

Posted: Fri Oct 17, 2008 3:06 pm
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.

Re: Does Teradata API Stage Support Datatype - DATE

Posted: Sun Oct 19, 2008 12:09 pm
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.

Posted: Mon Oct 20, 2008 9:07 pm
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