SSIS XML Source - Load Parent Node Value
Team, Q1 - How do I load the parent node attribute value during the SSIS data load in SSIS 2008 XML Source Dataflow. Please look the data you can understand. I have Order Herader Information with OrderID,OrderDate and Other Information. Also Order Line Items with ProductID,Name and Quantity. But OrderID Not present in the <Order Line Items> tag. Can i load OrderID from header? Can you tell me the best way to do this? --- XML Source <Order Header> <OrderID>101</OrderID> <OrderDate>1/1/2011</OrderDate> <Order Line Items> <Order Line Item> <ProductID>P1</ProductID> <ProductName>P1</ProductName> <Quantity>10</Quantity> </Order Line Item> <Order Line Item> <ProductID>P1</ProductID> <ProductName>P1</ProductName> <Quantity>10</Quantity> </Order Line Items> </Order Line Items> </Order Header1> </Order Header> <Order Header> ... ... .. </Order Header> ThnaksLiyasker Samraj K
April 11th, 2011 3:09pm

Did you try using the XML Source? There is a catch, if you do not see the whole data you may need to surround your XML with an outer root node.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
April 11th, 2011 3:29pm

Thank you for your response. In my case i dont have the Reference Key (OrderID) to join with Parent. If the Reference key is ther then i can load in to Staging table and to the join. Our case Order Line items does not have OrderID. But Line items present present with in the Header(Order) Tag. If we are doing this by SQL then we can use XQuery, XValue function. I have to do this SSIS. Thanks, Liyasker Samraj K
April 12th, 2011 1:56am

Thank you for your response. In my case i dont have the Reference Key (OrderID) to join with Parent. If the Reference key is there then i can load in to Staging table and do the join. Our case Order Line items does not have OrderID. But Line items present present with in the Header(Order) Tag. I need an approach from SSIS. Thanks, Liyasker Samraj K
Free Windows Admin Tool Kit Click here and download it now
April 12th, 2011 1:56am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics