Creating several files whose name depend on the content of the file

Similar to the previous use case, you may want to generate several files whose names will depend on the content they will have. Suppose you want to generate several sales files, one per product line. The filenames would be sales_<product line>.txt as in sales_Cars.txt. You will know the names only when you have the data ready to be sent to the output file. Doing this is really simple, as shown next:

  1. Open the Transformation that reads the sales_data.csv file, and save it with a different name.
  2. After the Text file input step, add the UDJE step. We will use this step for defining the name of the output files.
  3. Double-click the UDJE step and add a new field named filename, of ...

Get Learning Pentaho Data Integration 8 CE - Third 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.