Local Mode:
HDFS mode:
Batch Mode:
Can be write an entire Pig Latin script in a file and execute it using the –x command. Let us have a Pig script in a file named sample_script.pig.
student = LOAD 'hdfs://localhost:9000/input/student.txt' USING PigStorage(',') as (id:int,name:chararray,city:chararray);
OR
student = LOAD 'hdfs:/input/student.txt' USING PigStorage(',') as (id:int,name:chararray,city:chararray);
Copyright ©2022 coderraj.com. All Rights Reserved.