Exponential

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
gopskrish
Participant
Posts: 37
Joined: Thu Mar 31, 2005 7:42 am

Exponential

Post by gopskrish »

Hi,

I am not able to load the data in the target (dataset) in the same format as my source (sybase). I am using PX and in server jobs i can able to do that without applying any rules. The data which is available like 0.00003 or similar kind of such stuffs are displayed in expontial form in the target.
How can i control this.
I have changed the source datatype from float to double and applied dfloattodecimalnoexp command also in my transformation storing the output in varchar format. Still I am facing the same problem. Let me know how can i overcome this.

cheers,
gops
I am verymuch interested to learn an ETL tool and i find datastage as the best one to do so.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

They're probably stored OK (as float or dfloat?) but the viewer has a limited range of precision, outside of which it resorts to exponential view. That is, I believe that the restriction is in the viewer, not in the Data Set itself.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gopskrish
Participant
Posts: 37
Joined: Thu Mar 31, 2005 7:42 am

Post by gopskrish »

Hi Ray,

I can able to see similar kind of data (i mean data with similar precision) in correct format except one where the input is like 0.0000 or 4.0000.
I mean if the source data is like 3.0456 and all i can able to see as it is.
I am storning the data as varchar2 only and ofcourse there is no precision specified over there. If i use the samething in server jobs i can able to see the data as it is in the source. I am not telling that it is a problem with dataset. I think it is a common problem in PX.
Let me know.

cheers,
gops
I am verymuch interested to learn an ETL tool and i find datastage as the best one to do so.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

From memory, the data browser flips to exponential when the number of decimal places exceeds 4, for float and dfloat data types. This is certainly the case with certain calculations in server edition. Within DataStage BASIC this behaviour can be overridden via a PRECISION declaration, but we don't have access to the source code of the data browser so, apart from lodging an enhancement request, I don't think there's much you can do about it other than viewing the data with a different, non-DataStage, tool to verify that full precision is, indeed, maintained. You can find the logical (storage) file names from the DataSet control file, and inspect them with that tool.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gopskrish
Participant
Posts: 37
Joined: Thu Mar 31, 2005 7:42 am

Post by gopskrish »

Hi Ray,

First of all Sorry for the delayed response.

In one such mapping i was able to see 6 or 7 decimal places without any exponential problem. The source data is float and i changed to double (at sybase source level) and subsequent columns to varchar2 and in that i applied dfloattostringnoexp option and i was able to see the data which has more decimal places as it is in the source. But for this I am not getting. I am getting for other columns which are much larger than the one which is 0.00003 and all. Throw me some light if u come across such thing.

Do i need to do some calculation in the middle to get the data as in the source like multiplying by 100 and then divide by 100 (something like that)

Let me know.

cheers,
gops
I am verymuch interested to learn an ETL tool and i find datastage as the best one to do so.
pneumalin
Premium Member
Premium Member
Posts: 125
Joined: Sat May 07, 2005 6:32 am

Write a C routine to convert the exponential

Post by pneumalin »

Gops,
If I were you, I will try to read all the source in as varchar and call a Routine to convert it to Numeric. For sure, you have to create a C routine using atof() yourself..
Post Reply