on 05-29-2013 11:25 AM
Dear Expert,
I have problem to merge data from difference node into one like below example.
Source :
<Order>
<DoneOrder>
<Product>Mat1</Product>
</DoneOrder>
<DoneOrder>
<Product>Mat2</Product>
</DoneOrder>
<PendingOrder>
<Produce>
<Produce>Mat3</Produce>
<Produce>
<Produce>
<Produce>Mat4</Produce>
<Produce>
</PendingOrder>
</Order>
Target :
<Root>
<AllOrder>
<rows>
<Product>Mat1</Product>
</rows>
<rows>
<Product>Mat2</Product>
</rows>
<rows>
<Product>Mat3</Product>
</rows>
<rows>
<Product>Mat4</Product>
</rows>
<AllOrder>
</Root>
Could you please suggest the solution for this transformation this message? (It will be good if not use UDF)
Thank you very much!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sujit,
In this case, materials in DoneOrder(Mat1, Mat2) and also materials in PendingOrder(Mat3, Mat4) should get populated in the target side.
If we map DoneOrder to rows, what about the PendingOrder. Hope it wont provide desired output(if I am right). If you have any other logic, Please post the same.
Regards,
DNK Siddhardha.
HI Songphon,
Please follow the mapping for your requirement.
Note: I am unable to understand that why you are using same "Produce" node as Root node and also Element node under "PendingOrder" in your payload.
Right Click on rows node and select Duplicate Subtree.
Map the original "rows" node to Done_Order and original "Product"(Target) node to "Product"(Source) node.
Map the duplicate "rows" node to Produce_1(in your payload, Produce(Root node)) and Duplicate Product(Target) to Produce_2(in your payload, Produce (Element Node)).
Mapping:
Result:
In case you are using "Produce" node as Element node without "Produce" as Root node, you need to map Pending_Order to duplicate "rows"(Target) node.
Regards,
DNK Siddhardha.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear All,
Thank you very much for your suggestion
Songphon L.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Please use XSLT mapping for this kind of requirement. Graphical mapping can be clumsy so best to go for XSLT mapping.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In your case, you are having two types of source segments as 'Done Order' & 'Pending Order'. If your requirement is such that first you have to populate target segment 'rows' corresponding to 'Done Order-Product' first & then according to 'Pending Order-Produce'. You can create a duplicate subtree of the target segment 'rows', so now you have two segments as 'rows'. Map the first with 'Done Order' & map the field Product(Source) to Product(target). Now map the second subtree of 'rows' with 'Pending Order' & map the field Product with Produce.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.