Pentaho Spoon - Output to multiple files based on field content

蹲街弑〆低调 提交于 2019-12-01 05:18:28

问题


I have been attempting splitting the results of a pentaho transform into multiple files based on the value of a specific field without any luck.

E.g. a result set containing the following:

SURNAME, FIRSTNAME, COUNTRY

Obama, Barack, USA

Cameron, David, UK

Blair, Tony, UK

Would result in 2 output files being created:

USA.txt - containing Obama's details and UK.txt - containing the other 2 rows

Any pointers would be greatly appreciated.


回答1:


You can construct a field act as output filename based on Country field. Sent the new constructed field as output filenames in "Text File Output" step.

See the flow screenshot below :

You can also download the solution file from here http://pentaho.phi-integration.com/kettle/kettle-files.

Hope this helps...

Dino



来源:https://stackoverflow.com/questions/6127485/pentaho-spoon-output-to-multiple-files-based-on-field-content

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!