-
Book Overview & Buying
-
Table Of Contents
Pentaho Data Integration 4 Cookbook
By :
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.
You will need a books' database with the structure described in the Appendix, Data Structures.
Carry out the following steps:
Create a new transformation.
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_authorAdd an XML Output step.
In the Filename textbox of the File tab, type the destination filename, including its complete path (without extension). In the Extension textbox, leave the default value, xml.
Fill the Content tab: As Parent XML element, type Books and as Row XML element, type Book.
Under the Fields tab, use the Get Fields button to get the fields. In the price...
Change the font size
Change margin width
Change background colour