Page 1 of 1

Dropping decimal/fractional seconds

Posted: Thu Apr 04, 2013 4:26 pm
by aartlett
G'day,
We are having a data issue reading timestamp 3 records from a sql server database on a unix platform.

First time we noticed it was trying to add decimal seconds to an existing timestamp so Heisenberg remains happy, but the output always truncated the fractional seconds. At first i thought it was an issue with StringToTimestamp, contrary to the posts here, but after the check below I thing it is more endemic.

I ran a simple job to read data from a table with decimal timestamps and peek the output

The job is simple:
ODBC -> TF -> Peek. no transformations or derivations.

Input:

check_time
2013-04-05 09:09:58.55
2013-04-05 09:10:10.667
2013-04-05 09:10:11.487
2013-04-05 09:10:13.01
2013-04-05 09:10:13.69

Output:
Peek_489,0: check_time:2013-04-05 09:09:58
Peek_489,0: check_time:2013-04-05 09:10:10
Peek_489,0: check_time:2013-04-05 09:10:11
Peek_489,0: check_time:2013-04-05 09:10:13
Peek_489,0: check_time:2013-04-05 09:10:13

Field is defined as timestamp length 23 size 3

We are dropping the decimal fraction.

Has anybody seen this before? Is there a configuration issue/tweak to let it know that decimal timestamps are valid?

Posted: Thu Apr 04, 2013 7:32 pm
by jwiles
Set the extended property of the Timestamp column to microseconds. The default does not include microseconds.

Regards,

Posted: Thu Apr 04, 2013 9:36 pm
by aartlett
Thanks a lot, that got it.