PDA

View Full Version : Value conversion



kettle_anonymous
04-19-2006, 01:44 AM
Attachment: Test Percent Textfile.ktr (http://forums.pentaho.org/archived_att/kettle/Test Percent Textfile.ktr) Hi there,


I am a newbie busy evaluating kettle for our company. I am busy putting through some of our existing processes and I find this product to be fantastic. However, I am busy with a specific process and I have, what I think, is a basic problem and I can't seem to solve this.



I have a comma separated text file as input. The first column is a description and the second column is a percentage. The client that I receive this file from is putting a percentage sign at the end of the percent. ie. "5.75%". I need to write a script that will convert this to 0.0575. is this possible and how do I accomplish this.



thanks



anon

jbleuel
04-19-2006, 02:44 AM
Attachment: Test Percent Textfile.ktr (http://forums.pentaho.org/archived_att/kettle/Test Percent Textfile.ktr) Hi anon,

you simply add a culculator step and divide by 100.
A sample is attached.

HTH,
Jens

kettle_anonymous
04-19-2006, 03:58 AM
thanks a million, it works like a charm