Created 12-13-2016 04:50 AM
Like Example.jar is there any sample pig scripts available with HDP?
Created 12-13-2016 05:07 AM
@Yukti Agrawal , the answer is no. But if you have HUE installed in your cluster, you should see some scripts. Check under this folder /usr/lib/hue/apps/oozie/examples.
Or do simply run locate command to search it.
I would recommend to create a simple script if you just want to test pig. Store a sample csv in HDFS and load that file in Pig:
A = LOAD '/the/path/in/HDFS/sample.csv' USING PigStorage(',') AS (driverId:int, truckId:int, driverName:chararray); some_columns = FOREACH A GENERATE driverId,driverName; STORE some_columns into 'output/some_columns' using PigStorage(',');
Created 12-13-2016 05:07 AM
@Yukti Agrawal , the answer is no. But if you have HUE installed in your cluster, you should see some scripts. Check under this folder /usr/lib/hue/apps/oozie/examples.
Or do simply run locate command to search it.
I would recommend to create a simple script if you just want to test pig. Store a sample csv in HDFS and load that file in Pig:
A = LOAD '/the/path/in/HDFS/sample.csv' USING PigStorage(',') AS (driverId:int, truckId:int, driverName:chararray); some_columns = FOREACH A GENERATE driverId,driverName; STORE some_columns into 'output/some_columns' using PigStorage(',');
Created 12-13-2016 07:29 AM
Unfortunately we dont have HUE in our cluster. Also locate command is not working in my client's env. I will try this script, hoping it will help.
Created 12-13-2016 03:54 PM
HWX has pig tuturial with come with data and script. I recommend you try this
http://hortonworks.com/hadoop-tutorial/how-to-process-data-with-apache-pig/