timestamp over-scale issue in 8.5

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
tcheslav
Participant
Posts: 20
Joined: Thu Jan 14, 2010 1:02 am
Location: Warsaw

timestamp over-scale issue in 8.5

Post by tcheslav »

Hi all.

Recently we moved from IBM IS 8.1 to 8.5.
Jobs were migrated and some issues appeared...
Here is one of them:

In 8.1
For the timestamp data type if You set scale higher than in database, engine throws warnings, but timestamp data is OK. Microseconds are available.

In 8.5
For the timestamp data type if You set scale higher than in database, engine throws warnings, but timestamp data is NOT OK. Microseconds are truncated.

Does anybody saw this issue before?
Maybe there is some variable that You can set to 8.5 would behave like 8.1 regarding overscale with timestamp?

This issue is very annoing because we would have to change zillion of stages to correct this...

Regards
Tcheslav
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Re: timestamp over-scale issue in 8.5

Post by SURA »

If you post the warning along with this post would be great!!

There should be an check box to choose the microsecond when you double click the column.

Ensure that option is selected!

DS User
tcheslav
Participant
Posts: 20
Joined: Thu Jan 14, 2010 1:02 am
Location: Warsaw

Post by tcheslav »

OK.

I'll try to add more details:

I have three timestamp fields that I read from database and write to seq file. Here are the field settings:

CZAS1 - sql type : timestamp, extend : microseconds, length: null, scale : null
CZAS2 - sql type : timestamp, extend : microseconds, length: 27, scale : null
CZAS3 - sql type : timestamp, extend : microseconds, length: 27, scale : 7

All three fields have same type and value in database.
Below are peeks from those fields:

Peek_20,1: id:2 czas1:1960-01-01 12:55:01.123456 czas2:1960-01-01 12:55:01.123456 czas3:1960-01-01 12:55:01.000000

As You can see microseconds for CZAS3 are truncated!

Below is the only warning that I got:

ODBC_Connector_6: Schema reconciliation detected a size mismatch for column CZAS3. When reading database column DATETIME(fraction=6) into column DATETIME(fraction=0), truncation, loss of precision or data corruption can occur.

Why fraction is 0 while scale is set to 7?!?

In 8.1 this worked without any problems...

Regards
Bartek
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm guessing that it is because 7 is an illegal value and that you got away with it in 8.1 but that 'loophole' has now been closed. Where did the 7 come from? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
tcheslav
Participant
Posts: 20
Joined: Thu Jan 14, 2010 1:02 am
Location: Warsaw

Post by tcheslav »

Where did the 7 come from?
It came from developers ;)
Now admins have to deal with it :|
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

LOL... obviously I was looking for something a little more specific than that but perhaps that is all that is known.
-craig

"You can never have too many knives" -- Logan Nine Fingers
tcheslav
Participant
Posts: 20
Joined: Thu Jan 14, 2010 1:02 am
Location: Warsaw

Post by tcheslav »

Now.

Anybody have any idea how to workaround this?
Or how to quickly change this in zillion of stages inside projects?

Regards
Bartek
Post Reply