Save Castable
save_castableSaves an in-memory CAS table to a caslib file or database table so it persists across drops or server restarts; optionally overwrites an existing target.
Instructions
Save an in-memory CAS table to a file (or database table) in a caslib.
A table loaded into CAS memory is lost when it is dropped or the CAS
server restarts unless it is saved. This writes it to the caslib's
data source, so promote_table_to_memory can load it again later.
An existing file is not overwritten unless replace is true.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"caslib_name": "<caslib_name>",
"table_name": "<table_name>"
},
"name": "save_castable"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| replace | No | Overwrite an existing file of that name (default false). | |
| server_id | No | CAS server (default ``cas-shared-default``). | cas-shared-default |
| table_name | Yes | The loaded table to save. | |
| caslib_name | Yes | Caslib of the loaded table. | |
| file_format | No | ``sashdat`` (default, fastest to load back), ``csv``, ``parquet`` or ``sas7bdat``. | sashdat |
| target_name | No | Name of the saved file, without extension (default: the table's name). | |
| target_caslib | No | Caslib to write to (default: the table's own). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||