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...
It seems like open source applications are the mainstream today. So many new products delivered through Aache foundation. Some do this. S...