Convert Decimal to Bigint

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
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Convert Decimal to Bigint

Post by mandyli »

Hi


I would to like to convert from Decimal to Bigint.

Is this anything I have to do from Transformer stage?


Thanks
Man
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Only if you need to save the decimal portion of the value.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

For example you may want to specify how the number is to be rounded or truncated.

Of course, if your decimal number has a scale of 0, that point is moot.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Thanks Ray & Wiles,


I have imported metadata from Orchestrate, there defined as Decimal 38 ,10.

But inside lookup they changed Decimal 38,10 to Bigint. Actually there is no decimal value all are whole Integer values. I am not sure why it is convert into Decimal 38,10 from NUMBER datatype after import into Datastage.

desc stage.v_m_xref
Name Null Type
--------------------------------------------------------------------------------------MID NOT NULL NUMBER
VMKE_ID NOT NULL NUMBER



Thanks
Man
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Oracle NUMBER fields (with no precision/scale defined) are imported into DataStage as Decimal(38,10) by default. The import process has no visibility to the actual data values present. You are certainly free to modify the scale value in the Table Definition you imported if you desire.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I was wondering if we were still on this topic. There's no need to effect any 'conversion' in this scenario that I can see.
-craig

"You can never have too many knives" -- Logan Nine Fingers
mandyli
Premium Member
Premium Member
Posts: 898
Joined: Wed May 26, 2004 10:45 pm
Location: Chicago

Post by mandyli »

Hi


I am going to close this. I hope IBM tightened up metadata checking between DataStage and the Database considerably since 8.1. So I have re-import the metadata for this table using Orchestrate into 8.7(Since we are using ORACLE EE stage), delete the metadata from the stage and reload it.

And then I can able to convert Decimal (38,10) to BIgint from Transformer stage.


Thanks for your help.

Thanks
Man
Post Reply