Torrezno
Torrezno

Reputation: 17

Pentaho Kettle - Loading excel with almost blank rows

I got an excel file from a uncontrolled source that comes with a row with all the fields filled and then several rows all fields blank except one (Always the same, is a commentary).

The commentaries belong to the ID of the "row with data".

I would like to make a new field "COMENTARY AGREGATED" with the concatenation of all the comenataries that belong to the ID but I don't know how to do it, as far as I know, you can't interact with the order of the rows as they are treated as independent. ¿Am I right and this is imposible to do inside kettle and should resort to a VB macro in excel as preprocess?

THanks for your time

Upvotes: 0

Views: 507

Answers (2)

nsousa
nsousa

Reputation: 4544

You can use a group by step, group by all fields except the comment one, and on aggregations choose “concatenate values separated by” and use a whitespace as value for the concatenation ( or nothing if you prefer).

The excel input can’t do all that on its own.

Upvotes: 1

Torrezno
Torrezno

Reputation: 17

for now I've advanced a little.

I found that in the Excel input step, in the Fields tab, the Repeat column can be set to Y, and if so, it fills the blank rows with the previous value.

Still don't know how to agregate the others but its a step in the right direction I guess.

Upvotes: 0

Related Questions