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

Deleting one or more files

Kettle provides two job entries for deleting files: Delete file and Delete files entries. You can find both in the File management category of entries.

In this recipe, you will see an example of how to delete a file. You will delete a file that includes the current date as part of its name, for example test_20101020.txt.

Getting ready

You must create a sample file; for example, test_20101020.txt. Make sure to use your current date instead of 20101020. Use the same format (yyyyMMdd).

How to do it...

  1. Create a new transformation.
  2. Drop a Get System Info step from the Input category into the work area.
  3. Double-click on the step and add a field named date. In the Type column, select system date(fixed).
  4. Add a Select values step from ...

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