Search code examples
excelpentahokettle

Pentaho, how to pull data from cells


I'm a new user to Pentaho AND a fairly weak user of Excel sheets, what I need Pentaho to do is what is described in the image. At the step right before conclusion I have several cells with different data.

I need to sort of merge them together into 1 cell with all the right data. I tried Normaliser/De-Normaliser and I couldn't get it to work properly.

In excel what I do is basically pull the data UP the columns to the cell I want based on a key which is common to those lines.

Let me know if someone needs further information.

In the transformation i receive a formated text file input, up until step 25 (obs) i'm reading only the first line of the text, which is where most of the information i need is located, by the pattern there are other possible 9 lines in each entry, some entries have up to 23 line,others have 6 only. Most of the data i can extract from line 1, but i also need data from 2 other lines, which the step "obs" exctracts with formulas by comparing the 2 initial digits, and then cutting the string i need from those lines, the thing is before doing the "filter rows" step, those information cells are not agregated in the same line, i need them all to be in the same line, as i posted the first image, but i cannot find the step that does so, or i don't have the knowledge to make said step function properly. If you need more information please let me know. I'm using this many steps because at some point i'll add triggers and validations for most of them to ensure data integrity.

What is to be done Transformation


Solution

  • Found the answer myself, first i had to use a Group by with a key that is present in all lines of the same "block" of cells, then another problem surfaced where the top line of the block contained information i needed,but it didnt have the group by key, therefore i had to use the Get Previous Row Field step to have those rows present BEFORE the Group by step. Hope i helped.