O'Reilly logo

Pentaho Data Integration 4 Cookbook by María Carina Roldán, Adrián Sergio Pulvirenti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating a simple XML document

In order to create a new XML document you can use the XML Output step. In this recipe, you will create a new XML file from a database containing books information.

Getting ready

You will need a books' database with the structure described in the Appendix,

How to do it...

Carry out the following steps:

  1. Create a new transformation.
  2. Drop a Table Input step, in order to obtain the books' information and type the following query:
    SELECT id_title
    , title
    , genre
    , price
    , concat(lastname,", ",firstname) author
    FROM Books
    LEFT JOIN Authors
    ON Authors.id_author=Books.id_author
    
  3. Add an XML Output step.
  4. In the Filename textbox of the File tab, type the destination filename, including its complete path (without extension). In the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required