Created 03-14-2016 02:56 PM
Copied script from tutorial:
a = LOAD 'geolocation' using org.apache.hive.hcatalog.pig.HCatLoader();
b = filter a by event != 'normal'; c = foreach b generate driverid, event, (int) '1' as occurance; d = group c by driverid; e = foreach d generate group as driverid, SUM(c.occurance) as t_occ; g = LOAD 'drivermileage' using org.apache.hive.hcatalog.pig.HCatLoader(); h = join e by driverid, g by driverid; final_data = foreach h generate $0 as driverid, $1 as events, $3 as totmiles, (float) $3/$1 as riskfactor; store final_data into 'riskfactor' using org.apache.hive.hcatalog.pig.HCatStorer();
I have -useHCatalog as "Arguments". Checked to run on TeZ.
No data loaded into the riskfactor table.
Bingo. I copied "–useHCatalog" instead of "-useHCatalog". The first character was the "long dash" character instead of the "short dash" character. The font in tutorial document should be changed to use the short dash. Or the user should just copy the correct text where it is actually double quoted. 😉