on 07-31-2010 2:30 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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".
Thank Sarvesh, the Guru of Mapping. That was the perfect solution for the proble.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
question is not much clear with the given example...can u rephrase it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
70 | |
26 | |
9 | |
9 | |
7 | |
6 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.