Timezone support for Date/Timestamp data types

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
manish1005
Participant
Posts: 39
Joined: Thu Nov 23, 2006 11:23 pm

Timezone support for Date/Timestamp data types

Post by manish1005 »

Hi,

I was wondering if there is anyway to extract(or load) records of date/timestamp/time datatypes with *timezone* information. My Database fields for date/time have timezone information associated with them, but when I use datastage timestamp/date datatypes it gets truncated.

Other way round, when I use sequential file to load data into database, sequential file does not recognize timestamp/time datatypes with timezone information(say +5-30).

If I use varchar data type to extract time/timestamp fields in sequential file and then try to convert it into timestamp in Modify stage (before supplying it to ODBC stage) then also I could not find any datastage function that supports timezone information.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you please provide an example of what you mean? Perhaps reading them as string data types is a good workaround.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
manish1005
Participant
Posts: 39
Joined: Thu Nov 23, 2006 11:23 pm

Post by manish1005 »

Example of data:

"timewithtimezone14","timestampwithouttimezone15","timestampwithtimezone16", "timewithouttimezone17"
"24:00:00-1359","4897-12-31 AD 10:23:54","4897-12-31 AD 13:53:54+05:30","24:00:00",

I can skip the AD/BC part for time being. My database can take input in the format specified above in INSERT SQL queries.

Perhaps reading them as string data types is a good workaround.
If I read then as varchar and load into ODBC Connector stage, first I get schema reconciliation errors. I turned schema reconciliation to No in ODBC connector stage, and now it gives some schema rec. warnings and following error message:
Item #: 15
Event ID: 203
Timestamp:: 2007-10-30 10:55:44
Type: Fatal
User Name: dsadm
Message:: ODBC_Connector_15: Error when checking operator: When binding input interface field "timestampwithouttimezone15" to field "timestampwithouttimezone15": No default type conversion from type "string[max=25]" to type "timestamp".
Error when checking operator: When binding input interface field "timestampwithtimezone16" to field "timestampwithtimezone16": No default type conversion from type "string[max=25]" to type "timestamp".
Error when checking operator: When binding input interface field "timewithouttimezone17" to field "timewithouttimezone17": No default type conversion from type "string[max=12]" to type "time".
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Include CAST functions in your SQL (the derivation columns) to convert to VarChar data type during the extraction phase. This will obviate the warning messages.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply