on 07-16-2008 12:18 PM
Hi experts,
Could please let me know how to perform mapping for the below explained scenario:
source structute:
B 0..unbounded
field 0..1
Target structure:
Dest 0..1
field1
field2
field3
The B structure has 3 lines ,from each line the field has to be mapped to field1,field2 & field3 respectively
i.e basically we have to loop the struture B and map to Dest.
Please let me know how to do.
Regards,
RDS
Hi Milan,
Could you please give me the complete udf code.
Regards,
RDS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
There is no condition
eg: source file
B 10A6
B 10A1 T 2022W
B 10A2 22W
the source structure occurs three times and this has to be mapped to the target structure look as follows
A10A6 10A1 T 2022W 10A2 22W
Regards,
RDS
Edited by: Shankar Raju Devadoss on Jul 16, 2008 1:57 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Target is 0..1, so maximum it occurs once,
So if any condition is there based on that we can map, by set the context, otherwise not possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
Write a UDF of Context type.
Pass two parameters String Field, String Constant.
The input to first value will be your source node field.
The input to second value will be a constant(0,1,2)
For first field value in target structure(field1) pass '0'
For second field value in target structure(field2) pass '1'
For third field value in target structure(field) pass '2'
The code will be like this.
result.addValue(Field[Constant[0]]);
reward points if useful.
regards,
Milan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As said by Progirl about condition, you should have 3 different conditon then you can map it otherwise it seems quite difficult to map it.
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 directly map 3 target elements to single source element. If any condition then based on condition you can map to single target element.
Thanks,
RamuV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any condition on which the mapping has to be peformed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.