How to convert row to columns
How to convert row to columns
Last edited by rajeshbcrec; 06-23-2012 at 09:37 AM.
Maybe using the Row De-normalizer step.
http://wiki.pentaho.com/display/EAI/Row+De-normalizer
Mick
Here is an example from Super Slawo: http://type-exit.org/adventures-with...lds-in-kettle/
Matt Casters, Chief Data Integration
Pentaho, Open Source Business Intelligence
http://www.pentaho.org -- mcasters@pentaho.org
Author of the book Pentaho Kettle Solutions by Wiley. Also available as e-Book and on the Kindle reading applications (iPhone, iPad, Android, Kindle devices, ...)
Join us on IRC server Freenode.net, channel ##pentaho
One moment of hesitation might occur, when looking for an adequate input step.
pdi-ce-4.3.0-stable
OpenJDK IcedTea 2.3.7 (7u21)
ubuntu 12.04 LTS (x86_64)
Typically what you do is read the data line by line.
Then you hook up a bit of JavaScript since you need to determine an ID for each line, I'm asuming Event=0, Event=1, and so on.
You also split the data on the colon (:) and clean up the data a bit (description on the next line(s)).
Then the denormaliser step is used.
Happy hacking,
Matt
Last edited by MattCasters; 06-22-2012 at 10:57 AM.
Matt Casters, Chief Data Integration
Pentaho, Open Source Business Intelligence
http://www.pentaho.org -- mcasters@pentaho.org
Author of the book Pentaho Kettle Solutions by Wiley. Also available as e-Book and on the Kindle reading applications (iPhone, iPad, Android, Kindle devices, ...)
Join us on IRC server Freenode.net, channel ##pentaho
If you can't press the supplier of your data to conform to a more sane input specification, you will have to code a couple of lines.
The "Property Input" step delivers the description torn apart like this:
I suggest you throw in a User Defined Java Class to suppress the first row (key=description, value=none) and modify the following row by shifting the text to the value column and resetting the key to 'description'.Code:key----------------------------------------------------------------- value------------ description The Software Protection service entered the stopped state.
pdi-ce-4.3.0-stable
OpenJDK IcedTea 2.3.7 (7u21)
ubuntu 12.04 LTS (x86_64)
Why did you stop halfway?
You were almost done...
pdi-ce-4.3.0-stable
OpenJDK IcedTea 2.3.7 (7u21)
ubuntu 12.04 LTS (x86_64)
It's not that hard to do and we already told you how to do it. So I don't think anyone is volunteering to write this for you.
Matt Casters, Chief Data Integration
Pentaho, Open Source Business Intelligence
http://www.pentaho.org -- mcasters@pentaho.org
Author of the book Pentaho Kettle Solutions by Wiley. Also available as e-Book and on the Kindle reading applications (iPhone, iPad, Android, Kindle devices, ...)
Join us on IRC server Freenode.net, channel ##pentaho