cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping help

Former Member
0 Kudos

Hi

I have a source field and target field. Now there is a requirement that I have to map as

If source_field < 11 and > 20 then only mapping with target_field should accept. Otherwise it should return 0 at target field.

How can i acheive it. Let me know if needed more clarification.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

use the mapping as



source_field --->less---------->\
      constant[10]/                    source_fied----> then
                                    ------or---------->if------------->targetfield
source_field --->greater------>/       constant[0]--->else
      constant[20]/

if the condition is

source_field < 11 or > 20 then only mapping with target_field should accept. Otherwise it should return 0 at target field.

Former Member
0 Kudos

Hi,

in your mapping check under Arithmetic you will fine function "less" & "greater". Just use them in your mapping with if conditions.

Regards,

Sarvesh

Former Member
0 Kudos

Hi,

You can write UDF or you can use the standard functionality also

UDF.

if (source_val < 11 && source_val >20)

return String.valueOf(source_val);

else return String.valueOf(0);

Regards

Ramesh

Former Member
0 Kudos

thanks Ramesh.

Can you mention what are all the standard functions i can use?

Former Member
0 Kudos

Hi,

> Can you mention what are all the standard functions i can use?

Check the below link

http://www.flickr.com/photos/42898709@N07/3952337583/

Here class is input value.

May be this statement is wrong because Bigger than 20 and smaller than 11 means always execute the false condition.

I think it is either Bigger than 20 or smaller than 11 then return the value otherwise return 0.

Regards

Ramesh