OLIPHANT Procedure

Example 1: Adding and Removing Files in HDFS

Details

This PROC OLIPHANT example demonstrates adding and removing data sets to HDFS. One data set is added and a different SASHDAT file is removed.

Program

libname hrdata "/data/hr/2011";

proc oliphant host="grid001.example.com" install="/opt/TKGrid"; 1
   add hrdata.emps blocksize=16M path="/sasdata/2011/" replace; 2

   add (label='Bonuses for 2011') hrdata.bonus path="/sasdata/2011"; 3
   remove salary path="/sasdata/2011"; 4
run;

Program Description

  1. The PROC OLIPHANT statement uses the HOST= and INSTALL= options to identify the SAS High-Performance Deployment of Hadoop cluster to use.
  2. The ADD statement copies the EMPS data set to the HDFS path. The data set is distributed in blocks of 16 megabytes each. If an emps.sashdat file for the EMPS data set already exists, it is replaced.
  3. This ADD statement includes a LABEL= option for the input data set.
  4. The REMOVE statement deletes the salary.sashdat file from the HDFS path.