on 09-25-2009 11:22 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
in your mapping check under Arithmetic you will fine function "less" & "greater". Just use them in your mapping with if conditions.
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.