how to convert Square_feet into Square_meter

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
ds_dwh
Participant
Posts: 39
Joined: Fri May 14, 2010 6:06 am

how to convert Square_feet into Square_meter

Post by ds_dwh »

how to convert Square_feet into Square_meter

in my source file one column in square_feet i need to convert into Square_meter when loading data into the target.

i know 1 square feet=0.0929 square meter
i taught by using transformer 0.0929*square_feet column=square_meter
this is possible or any other methods.

can any one help.
ANJI
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In a server job or in a BASIC Transformer stage you can use the SDK Transform MeasureAreaSqFeetToSqMeters.

Detail of its transform definition:

Code: Select all

(%SqFeet% * .09290)
Otherwise just multiply by the constant. Make sure that the Sq Feet value is not null and is numeric, so as to prevent errors. Since square metres is always less than square feet, and a negative value of square feet is technically impossible, you don't need to detect/handle arithmetic overflow if the target data type matches the source data type.

Actually, there is at least one possibility where negative might be valid, in a time series - a question like "how much area does $1000 buy now compared with five years ago?" - but the square metres value will still be closer to zero than the square feet value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds_dwh
Participant
Posts: 39
Joined: Fri May 14, 2010 6:06 am

Post by ds_dwh »

ray.wurlod wrote:In a server job or in a BASIC Transformer stage you can use the SDK Transform MeasureAreaSqFeetToSqMeters.

Detail of its transform definition:

Code: Select all

(%SqFeet% * .09290)
Otherwise ...
I NEED IN PARALLEL JOBS
ANJI
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Doing it in a transform stage is the simplest way. You could write your own c++ buildop to perform this conversion but it would be a lot more work than using the transform stage.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

What is the problem you are facing ?

Is it giving incorrect values or you need to know how to do the coding ?

If you are using a database as our target, you can create an user-defined SQL to calculate it there.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As noted, you already know how to convert one to the other, so what is it you are worried about or having an issue with? Not getting an expected answer? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ds_dwh
Participant
Posts: 39
Joined: Fri May 14, 2010 6:06 am

Post by ds_dwh »

Sainath.Srinivasan wrote:What is the problem you are facing ?

Is it giving incorrect values or you need to know how to do the coding ?

If you are using a database as our target, you can create an user-defined SQL to cal ...
HERE SOURCE IS FLAT FILE TARGET IS INFORMIX

SOURCE FIELD IN SQUARE_FEET IN TARGET I NEED IN SQUARE_METER
MY LOGIC GIVING IN CORRECT VALUES
ANJI
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

First thing - typing in all caps is considered SHOUTING so please knock that off. There's no need to shout.

Secondly, show us. Post the 'calculation' you are using and the precise datatypes involved and then show us the 'in correct' values you are seeing. Then maybe someone can help you.
-craig

"You can never have too many knives" -- Logan Nine Fingers
antonyraj.deva
Premium Member
Premium Member
Posts: 138
Joined: Wed Jul 16, 2008 9:51 pm
Location: Kolkata

Post by antonyraj.deva »

ds_dwh wrote: I NEED IN PARALLEL JOBS
Why not Server Jobs?

And as Craig pointed out, post the calculation logic and sample values.

Only then anybody can help.
TONY
ETL Manager
Infotrellis India

"Do what you can, with what you have, from where you are and to the best of your abilities."
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The calculation is exactly the same in server and parallel jobs. Please be more specific about (a) data types and (b) what you mean by "incorrect".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply