Page 1 of 1

how to convert Square_feet into Square_meter

Posted: Sun Jun 27, 2010 11:38 pm
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.

Posted: Mon Jun 28, 2010 12:31 am
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.

Posted: Mon Jun 28, 2010 3:21 am
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

Posted: Mon Jun 28, 2010 3:41 am
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.

Posted: Mon Jun 28, 2010 3:55 am
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.

Posted: Mon Jun 28, 2010 5:34 am
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? :?

Posted: Mon Jun 28, 2010 6:35 am
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

Posted: Mon Jun 28, 2010 6:48 am
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.

Posted: Mon Jun 28, 2010 7:08 am
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.

Posted: Mon Jun 28, 2010 3:25 pm
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".