Suppose you have an online system for your customers to order products. On a daily basis, the system creates a file with the orders information. Now you will check if you have stock for the ordered products and make a list of the products you'll have to buy.
Create a new transformation.
From the Input category of steps, drag a Get data from XML step to the canvas.
Use it to read the
orders.xml
file. In the Content tab, fill the Loop XPath option with the/orders/order
string. In the Fields tab get the fields.Add a Sort rows step and use it to sort the data by
man_code
,prod_code
.Add a Group by step and double-click it.
Use the upper grid for grouping by
man_code
andprod_code
.Use the lower grid for adding a field with the number of orders in each group. As Name write
quantity
, as Subjectordernumber...