on 03-25-2010 2:52 AM
Hi,
I 've done the mapping based on the below conditions
Let say 3 fields called : a,b,c
if a = RAM then
b = b/c
here b field is in one segment and a & c fields are in child segment of above segment.
Note : all the above fields occurance : 0 to 1
But, i need to display the target including with the above condition also i need the value of the field "b" should display at target side where the condition doesn't satisfy .. ie., a # RAM.
Here i 've tried with if then else condition...but that doesn't work.
Please help me out how can i get the output.
Thanks in advance for your help
Regards,
Y.Raj
Assuming that the node in which a and c occur is 0:1.
Then the following mapping should work for you even without any context changing.
http://4.bp.blogspot.com/_5ov9AjKNCiY/S6uLJv4kY3I/AAAAAAAABwU/g62W0JZ7WIs/s1600/Mapping.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is a # RAM means? Do you meant to say
a *not equal to* RAM?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yeshwant,
IF you have the source structure as:
segment
--b
---subsegment
-
a
-
c
then you may need these changes in Raj's mapping image
b-----------------------------------|
c (context changed to parent of c)--| useoneasmany -- divide
c ----------------------------------|
b-----------------------------------|
c (context changed to parent of c)--| useoneasmany -- else
c ----------------------------------|
Regards
Suraj
create an udf with three input parameters a,b,c and then use:
String out = "";
if(a.equals("RAM")){
out = b/c;
}
else{
out = b;
}
return b;
As cardinality is 0 .. 1 for all fields use mapwithDefault standard function for all the fields before the calling the UDF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For a = RAM
a -->
--> equalS --> if (Then --> Source) --> Target
Constant(RAM) -->
For a not equal to RAM
a -->
--> equalS --> Not --> if (Then --> b) --Target
Constant(RAM)
Try setting the context to a higher node since you mentioned that the fields are in different segments.
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.