9 digit precision in timestamp in datafiles

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
udayanguha
Premium Member
Premium Member
Posts: 37
Joined: Wed Oct 29, 2014 10:48 pm
Location: Ohio

9 digit precision in timestamp in datafiles

Post by udayanguha »

I have some data files in which the timestamp is like yyyy-mm-dd hh:mm:ss.000000000
So after the seconds field, there are 9 digits (I think it denotes nano seconds). I need to load this data into Db2 but don't think Datastage handles anything more than microseconds.

How can I load such data into Db2?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Seems to me you'd need to stick with DB2 utilities for this.
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

It looks like DataStage supports up to 6 digits for fractional seconds whereas DB2 and ODBC support up to 12 digits. Strange that it doesn't match up...

You may be able to handle it as a string data type (char or varchar) in DataStage and cast it to DB2 TIMESTAMP data type when you load it.
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That very thought occurred to me while I was driving into work this morning... figured someone else would probably beat me to it. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply