Writing a simple file

In this recipe, you will learn the use of the Text file output step for writing text files.

Let's assume that you have a database with outdoor products and you want to export a catalog of products to a text file.

Getting ready

For this recipe, you will need a database with outdoor products with the structure explained in Appendix A, Data Structures.

How to do it...

Carry out the following steps:

  1. Create a new transformation.
  2. Drop a Table input step into the canvas. Enter the following SQL statement:
    SELECT innerj.desc_product, categories.category, innerj.price FROM products innerj
    INNER JOIN categories
    ON innerj.id_category = categories.id_category
  3. From the Output category, add a Text file output step.
  4. In the Filename textbox under ...

Get Pentaho Data Integration Cookbook Second Edition 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.