LASR Procedure

SAVE Statement

The SAVE statement is used to save an in-memory table to HDFS.

Syntax

SAVE table-specification / save-options;

Required Arguments

table-specification

specifies the table that is in memory. For a table that was loaded from a SAS library with the procedure, the table specification is the same libref.member-name that was used to load the table. For a table that was loaded from HDFS, the table specification is the same as the HDFS path to the table, but is delimited with periods (.) instead of slashes (/). For a table that was loaded from the / directory in HDFS, the table specification is HADOOP.TABLENAME.

save-options

specifies the options for saving the file in HDFS.

BLOCKSIZE=

specifies the block size to use for distributing the data set. Suffix values are B (bytes), K (kilobytes), M (megabytes), and G (gigabytes). The default block size is 32M.

Alias BLOCK=

COPIES=n

specifies the number of replications to make for the data set (beyond the original blocks). The default value is 1.

FULLPATH

specifies that the value for the PATH= option specifies the full path for the file, including the filename.

PATH='HDFS-path'

specifies the directory in HDFS in which to store the SASHDAT file. The value is case sensitive. The filename for the SASHDAT file that is stored in the path is always lowercase.

Note: If the PATH= option is not specified, the server attempts to save the table in the /user/userid directory. The userid is the user ID that started the server instance.

REPLACE

specifies that the SASHDAT file should be overwritten if it already exists.