Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kettle PDI Concat column values

I have a PDI (Kettle) transformation that execute an SQL script, the output of scripts is a column looks like:

val1

val2

val3

val4

"more values"...

I need write this on a only one Excel cell like this:

val1 val2 val3 val4 "more values"...

How i can do this?

I tried "row denormaliser" and "row flattener" but dont work (i dont know why)

like image 861
Andrés Avatar asked Nov 20 '25 21:11

Andrés


1 Answers

The flattener is an option, but you have problems because you do not know the number of new fields and the seperator. But there is a "trick" to solve your problem:

You can do so by following these steps:

  1. Add a constant after your input, name: test, type: string, value: a
  2. Group by the new field test, aggregate your field with the values with "Concatenate strings separated by" and set a space as seperator.

The output is:

val1 val2 val3 ....

like image 117
Seb Avatar answered Nov 22 '25 17:11

Seb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!