简体   繁体   中英

Pentaho - Spoon Decimal from Text File Input

I'm new to Pentaho and have a little problem with the Text file Input.

Currently I have to have several data records written to a database. In the files, the decimal numbers are separated by a point. Pentaho is currently transforming the number 123.3659 € to 12.33 €. Can someone help?

When you read the file, do you read it as a csv, excel or something like that? If that's the case, then you can specify the format of the column to interpret the number correctly (I think, I'm talking from memory now) Or maybe playing with the language of the file might work.

If it's a file containing a string, you can use some step like the string operator to replace the point with a comma.

This problem might come from various reasons. Although I think that by following the next steps you can solve the issue.

-First, you must get a "Replace in String" step;

-Then search for the dot and replace it with nothing as I show in the following image, or with a coma if the number you show is a float; Example snip

Hope this helped! Give feedback if so! Have a good day!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM