You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Chris Lin <ch...@etudata.com> on 2012/03/16 12:08:42 UTC

Output format for scientific expression

Hi all,

I am reading in a simple data file like below:
abc,123456789.123456
def,987654321.654321

With script:
A = LOAD 'test.csv' using PigStorage(',') AS (id, num:double);
dump A;

And the result is like this:
(abc,1.23456789123456E8)
(def,9.87654321654321E8)

I tried to cast field num to chararray but the dump result is the same. The
reason I loaded the field as double is because I need to do some arithmetic
operations in the follow-up script and I will have to cast it to double
anyway. May I know if you know any build-in or piggy bank UDF that can show
the field in the normal, non-scientific expression way?

Thank you very much.
Chris