5/24/2017

Bloom Consulting Since Year 2000

My company is called Bloom Consulting.  Although it's a Sole Proprietor, it was formed all the way back in August 2000.  Quite a long time to be a consultant.

I've had a few clients over the years, although I don't actively pursue side work.  I tend to work full time roles with benefits.
I've had classic Visual Basic gigs, classic Microsoft ASP projects, Visual Source Safe integration, SSIS, SSAS, Data Warehousing as well as Crystal Reports projects.

I've had small project offers that I passed along to other developers.

I've worked on projects to gain new experience as well as extra cash flow to throw at the mortgage.  Some projects were over a year in duration and had one for 16 hours, to figure out why some Crystal Reports were slow.

How long have I been consulting?  Over 17 years.

How long have I been programming?  35 years. 3/4 of my life.

5/10/2017

Format Currency, Percentage, Date, and Mask SSN in Hive SQL

In Hive SQL, to format Currency, Percentage and Date, use the following SQL:


SELECT
    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.


Happy coding~!

Get Sh#t Done!