cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping Issue

Former Member
0 Kudos

Input structure

-SNode1 1..unb

--Key1

--Key2

--Fld1

--Fld2

--Fld3

Output structure

-TNode1

--Header 1..1

---Key1

---Fld2

--Item 1..unb

---Key2

---Fld1(sum)

---Fld3

eg.

Example

Key1 - key2 - fld1 - fld2 - fld3

A1 - B1 - 10 - d1 - e1

A1 - B1 - 20 - d1 - e1

A1 - B2 - 20 - d1 - e1

A2 - B1 - 20 - d2 - e2

A2 - B3 - 30 - d2 - e2

A2 - B3 - 10 - d2 - e2

output should be

A1 - D1

B1 - 30 -e1

B2 - 20 -e1

A2 - D2

B1 - 20 -e2

B3 - 40 -e2

I need to create item nodes in Target TNode1 based on the matching key1(in header node).

My mapping is creating Item nodes without considering key1(in Header TNode1). All the field level mapping is working fine only issue is the node level mapping

Key1 u2013 sort--- SplitByValue(value change)u2014u2014collapseContextsu2014 SplitByValue(each value)u2014TNode1

Key1 u2013 sort--- SplitByValue(value change)u2014u2014collapseContextsu2014 SplitByValue(each value)u2014Header

Key1

-


concat -sort- SplitByValue(value change)u2014collapseContextsu2014 SplitByValue(each value)u2014Item

Key2

My output is showing as follows using the above mapping

A1- D1

B1 -30 -e1

A2 - D2

B2 - 20 -e1

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Source has all the items at individual level. Mapping should sum at key2 level and write a header(using key1) and item(using key 2). Target item will be created for every different key2 value. Target Header will appear again when ever there is new key1 value and item will appear for key2 value within matching key1 value.

Former Member
0 Kudos

Try your node mappings as given in the link.. and let us know in case of any issue..

http://www.flickr.com/photos/23639237@N02/4849336976/sizes/l/

Note: Look node function "SplitByValue" carefully for it's properties used in mapping e.g. if it is "Each value" or "Value change".

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank Sarvesh, the Guru of Mapping. That was the perfect solution for the proble.

prabhu_s2
Active Contributor
0 Kudos

question is not much clear with the given example...can u rephrase it?