简体   繁体   中英

Add Custom Header in Pentaho

I have data that looks like the following:

assetnum | assetdesc

123 | sampledesc

432 |sample desc2

I want to insert another row with four fields so it looks like the following:

SYSNAME | OBJSTRUC | AddChange | En

assetnum | assetdesc

123 | sampledesc

432 |sample desc2

However I am unsure how to do this. Does anyone know how? I have tried generating rows but I am unsure how to merge so that it looks like this. I have also thought of adding headers but I am unsure how to specify the header (without it being created automatically) I am quite new to Pentaho. Thanks.

Here is a hack. Assume StepA writes the actual data into a file fileA . Before writing anything into your fileA have a Text file output step and in the content tab, Add Ending line of file field, enter the custom row you need to insert. Since the file is empty at the beginning, your last line will become the first line. Once it is done, you can write the other data as per your original source using Append flag. To set the dependency, use the Block until steps finish to block the actual write in StepA .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM