Save a table

post/servers/{serverName}/caslibs/{caslibName}/tables/{tableName}
Internal-Use Only

Saves a CAS table to a source table.

Request Samples

1

Response Samples

1No example avaliable

Path Parameters

NameTypeRequiredDescription
caslibName
string
true

The name of the Caslib containing the table.

serverName
string
true

Server name for which the table is being accessed.

tableName
string
true

Table name being saved.

Query Parameters

NameTypeRequiredDescription
sessionId
string
false

Session ID (used when session-specific table is being accessed).

Request Body

Inputs when saving a CAS table to a source table or external file.

NameTypeRequiredDescription
caslibName
string
false

Name of the output caslib to which the source table or external file will be written. If not specified, defaults to the caslib name containing the table to be saved.

format
string
false

Format of the output file. Valid values include sashdat, csv, parquet, sas7bdat. Defaults to sashdat.

replace
boolean
false

If true, any pre-existing table with the same name is replaced. Defaults to false.

compress
boolean
false

If true and saving to a sashdat, the saved table is compressed. Defaults to false.

tableName
string
false

Name of the output table or external file. If specified, this name is always used. The file extension will always honor the format requested (or default to sashdat). If this parameter is not specified, the name defaults to the same name as the source of the table being saved, provided it differs in case only from the name of the table being saved. If no source table name is available, then the name will be the same as the table. The following table shows sample scenarios and the value chosen by default for the tableName when this parameter is omitted. tablestatesourceformatdefault tableName MOREDATAloadedsashdatMOREDATA.sashdat MYDATAloadedMyData.sashdatMyData.sashdat MYDATAloadedMyData.sashdatcsvMyData.csv DATA2unloadeddata2.csvdata2.sashdat DATA3unloadeddata3.csvcsvdata3.csv DATA4loadedOtherData.csvDATA4.sashdat DATA5unloadedOtherData.csvcsvDATA5.csv

sourceTableName
string
false

Normally, the source table name for an unloaded table is determined automatically and this option is not required. If specified, this specific source table name is used as the source data to read for the save table operation.

parameters
object
false

A name/value pair map of additional parameters to pass when performing the save in the event that the table being saved is not already in memory as a CAS table and needs to be accessed from the source. These parameters generally are passed directly to the caslib source when accessing the data and are specific to the source type. Exceptions include the following parameters, which are passed directly to the Save operation: * importOptions * groupBy * orderBy * vars See the CAS action documentation for saveTable for details about the valid parameter values.

Responses

StatusMeaningDescription
201CreatedThe table was saved successfully.
400Bad RequestThe request was invalid.Schema
404Not FoundThe requested CAS server or Caslib does not exist.
409ConflictThe request could not be completed due to a conflict with the current state of the resource. Details are included in the response body.