Search code examples
pentahopentaho-spoonpentaho-data-integration

Pentaho Data Integration New Row for Each Deliminated Value in a Column


I have a stream with a column with a variable number of semicolon deliminated values with a layout like

activities ticket_id 1;2;3 1 4;5 2 6; 3 7;8;9;10 4

. How can I get a new row for ever activity, like this

activity_id ticket_id 1 1 2 1 3 1 4 2

and so on?

In case I formatted this question wrong, here's an image

enter image description here


Solution

  • Simply use the "Split field to rows" step, use the Activities column as the field to split and ";" as the Delimeter.

    Remenber that when you have a single value AND the delimeter, the step will output an additional row with an empty string. In this scenario the step will auto adjust the ticket_id column to repeat the values.

    enter image description here