Hi,
I am trying to execute the following PIG script to find the AVG of Stock_Volume field
a = LOAD ‘default.nyse_stocks’ USING org.apache.hive.hcatalog.pig.HCatLoader();
b = FILTER a BY stock_symbol == ‘IBM';
c = group b all;
d = foreach c generate AVG(b.stock_volume);
dump d;
I receive the following error
2015-02-10 16:14:19,123 [main] INFO org.apache.pig.Main – Apache Pig version 0.14.0.2.2.0.0-2041 (rexported) compiled Nov 19 2014, 15:24:46
2015-02-10 16:14:19,123 [main] INFO org.apache.pig.Main – Logging error messages to: /hadoop/yarn/local/usercache/hue/appcache/application_1423510712708_0012/container_1423510712708_0012_01_000002/pig_1423584859121.log
2015-02-10 16:14:21,803 [main] INFO org.apache.pig.impl.util.Utils – Default bootup file /home/yarn/.pigbootup not found
2015-02-10 16:14:22,611 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine – Connecting to hadoop file system at: hdfs://sandbox.hortonworks.com:8020
2015-02-10 16:14:26,932 [main] ERROR org.apache.pig.tools.grunt.Grunt – ERROR 1070: Could not resolve org.apache.hive.hcatalog.pig.HCatLoader using imports: [, java.lang., org.apache.pig.builtin., org.apache.pig.impl.builtin.]
Details at logfile: /hadoop/yarn/local/usercache/hue/appcache/application_1423510712708_0012/container_1423510712708_0012_01_000002/pig_1423584859121.log
Please help . I am new to Pig.
Thanks,
PSB