The SAVE statement enables you to save an in-memory table as a SASHDAT table or a CSV file. The table must be the active table. You specify the active table with the DATA= option in the IMSTAT procedure or with the TABLE statement.
Example: | Deleting Rows and Saving a Table to HDFS |
specifies the block size to use for distributing the data set. Suffix values are B (bytes), K (kilobytes), M (megabytes), and G (gigabytes).
Interaction | If the in-memory table is partitioned, the BLOCKSIZE= specification is ignored. The server determines the block size based on the size of the partitions. |
specifies the number of replications to make for the data set (beyond the original blocks). The default value is 1. You can specify COPIES=0 if you do not need replications for redundancy.
specifies to save the table as a comma-separated value file. The first line of the file includes the variable names.
Interaction | The SQUEEZE option is ignored if you specify CSV. |
Examples | table hps.stocks; save path="/hps/stocks2.csv" fullpath replace csv; run; |
To load a CSV file to memory, you can use the SASHDAT engine
and PROC LASR as follows:libname hpscsv sashdat host="grid001.example.com" install="/opt/TKGrid" path="/hps"; proc lasr add data=hpscsv.stocks2(filetype=csv getnames=yes) port=10010; performance host="grid001.example.com"; run; |
specifies a key value for AES (Advanced Encryption Standard) encryption.
See | For more information, see ENCRYPT= Data Set Option. |
specifies that the value for the PATH= option specifies the full path for the file, including the filename (without the SASHDAT extension). The filename portion of the quoted string is expected to be in lowercase characters.
specifies the directory in which to store the table as a SASHDAT file. The value is case sensitive. The filename for the SASHDAT file that is stored in the path is always lowercase.
specifies that the SASHDAT file should be overwritten if it already exists.
saves the result table so that you can use it in other IMSTAT procedure statements like STORE, REPLAY, and FREE. The value for table-name must be unique within the scope of the procedure execution. The name of a table that has been freed with the FREE statement can be used again in subsequent SAVE= options.
specifies to apply the encryption policies stored in metadata to the file.
See | For more information, see SIGNERFILEPOLICY Data Set Option. |
specifies to save the table in the SASHDAT file in compressed form.