Time for action – using a Database lookup step to create a list of products to buy

Suppose that 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:

  1. Create a new transformation.
  2. From the Input category of steps, drag a Get data from XML step to the canvas.
  3. 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. Also, as the first row insert an integer field named ordernumber. This is an attribute in the file, so as Xpath, type @ordernumber.
  4. Do a preview. You will ...

Get Pentaho Data Integration Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.