apache pig - Pig Round Decimal to Two Places -
How do I score a float data type in 2 decimal places in Apache Pig? For example:
test = FOREACH (Joy Load By (OP 1, OP 2), Load 2 by (OP, OP4)) Load 2: : Number 2 * Load :: Number 1 as output Field numbers 1 and number 2 are floats. My current calculation gives me 5 to 6 decimal places.
Try it out:
B = FOREACH A GENERATE ((( AM Flat 1 * AM Flat 2) * 100 F) Round) / 100 F AS IFLOT 3
Comments
Post a Comment