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

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -