Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

Sandbox 2.4 Step 3.4.1 Execute Pig Script - "ERROR 2997: Encountered IOException. File –useHCatalog does not exist"

avatar
Contributor

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.

1 ACCEPTED SOLUTION
2 REPLIES 2

avatar
Contributor

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

Thanks.

Labels