jkd
jkd

Reputation: 1

HIVE decimal 2 precision

In my hive table the actual values looks as below.

 100
 200.345
 12.365

I want to have them looks like:

 100.00
 200.34
 12.36

How it can be possible?

Upvotes: 0

Views: 7655

Answers (1)

YoungHobbit
YoungHobbit

Reputation: 13402

You should declare as decimal(5,2). Hive Decimals .

The syntax is DECIMAL(precision, scale). Precision means the number of digits of this number including the digits after the dot.

Upvotes: 2

Related Questions