cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping issue

Former Member
0 Kudos

Hi All,

I have a issue with mapping. The example is like below:

Source Structure:

Level1 (0-unbounded) reoccurring lets say 15 times

field A

field B

Level2 (0-unbounded) reoccurring lets say 10 times

field C

field D

field E

Target Structure

Level1 (0-unbounded) must reoccurre 150 times

field A

field B

field C

field D

field E

Couldn't do it in Graphical Mapping. Any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Can you give more clarity on it....as I just want to know on what basis you want the target to occur 150 times....

Regards,

Sainath Chutke

Former Member
0 Kudos

Hi,

For Example

Source Structure: ( 2 times Level1 and 2 times Level2 )

Level1

field A

field B

Level2

field 1

field 2

field 3

Level2

field 4

field 5

field 6

Level1

field Y

field Z

Level2

field 9

field 8

field 7

Level2

field 9

field 8

field 7

Target Structure (4 times Level1)

Level1

field A

field B

field 1

field 2

field 3

Level1

field A

field B

field 4

field 5

field 6

Level1

field Y

field Z

field 9

field 8

field 7

Level1

field Y

field Z

field 9

field 8

field 7

Thanks.

Former Member
0 Kudos

Hi Arman,

Please do the below mapping it ll work fine


Level2-->Removecontext-->Level1

Field1--->\
Level2----->use one as many-->Split By Value(Each Value)-->Field1
Level2 -->/

Follow the above mapping for Field2 also

Field3-->Field3
Field4 --> Field4

Regards,

Malini

Former Member
0 Kudos

Hi,

I tried it but it gives an exception:

Too many values in the first queue in function useOneAsMany. It must have the same number of contexts as the second queue]

former_member200962
Active Contributor
0 Kudos
Couldn't do it in Graphical Mapping. Any ideas?

mapping may not be able to handle it....your target structure needs to be re-looked.

oneAsMany giving an error in your case as there is no field which occurs just once in the entire message (all seem to be 0..unbounded)

Regards,

Abhishek

Former Member
0 Kudos

Thanks,

Solved it in writing some UDF's.

Regards,

Arman

Answers (1)

Answers (1)

stefan_grube
Active Contributor
0 Kudos

This can be done with node function UseOneAsMany.