Example: Upload a text file to the file system and use Pig to save it as an ORC file

  1. Upload the file to the file system:
    cd /home/mapr
    sudo -u mapr hadoop fs -put ./test_pig.data /test_pig.data
    sudo -u mapr hadoop fs -mkdir /output
  2. Start Pig and save the text file in ORC format:
    sudo -u mapr pig
    grunt> A = LOAD '/test_pig.data' using PigStorage(',') AS (first_name:chararray, last_name:chararray);
    grunt> store A into '/output/A' using OrcStorage('');
  3. Verify that the ORC file was created:
    hadoop fs -ls /output/A/