In Hive SQL, to format Currency, Percentage and Date, use the following SQL:
CONCAT('$',format_number(COALESCE(12345.6789,0),2)) AS `Sample Currency Format`,
CONCAT(format_number(COALESCE(98.6543,0),2),'%') AS `Sample Currency Format`,
from_unixtime(unix_timestamp(TO_DATE(CURRENT_DATE) , 'yyyy-MM-dd'), '01-01-yyyy') AS
`Sample Date Format`,
CONCAT('****-**',SUBSTR("123456789", LENGTH("123456789")-2, 3)) AS MaskedSSN
You could also apply the Round function if needed.
I signed up for the Hortonworks Certified Associate exam last Thursday. Figured if I sign up, I'd have to take the test. And if I tak...
Saw a post today on Twitter, " Microsoft releases CNTK, its open source deep learning toolkit, on GitHub " This is big news. Be...
This blog post is in no way an attempt to steal other people's work. It's basically an conglomeration of notes from research I did...