Table Action Set: Syntax

Provides actions for accessing and managing data

addTable Action

Add a table by sending it from the client to the server.

Note:The addTable action cannot be run from CASL, Python, and other clients in the same way that other actions like loadTable are run. Each client provides a client-specific function or method for transferring data to the server that runs the addTable action.

CASL Syntax

table.addTable <result=results> <status=rc> /
append=TRUE | FALSE,
caslib="string",
columnar=TRUE | FALSE,
commitRecords=64-bit-integer,
commitSeconds=64-bit-integer,
compress=TRUE | FALSE,
copies=integer,
descending={integer-1 <, integer-2, ...>},
label="string",
maxMBytes=64-bit-integer,
orderBy={"variable-name-1" <, "variable-name-2", ...>},
partition={"variable-name-1" <, "variable-name-2", ...>},
promote=TRUE | FALSE,
required parameter recLen=integer,
repeat=TRUE | FALSE,
replace=TRUE | FALSE,
table="table-name",
vars={{
format="string",
label="string",
required parameter length=integer,
required parameter name="string",
nfd=integer,
nfl=integer,
required parameter offset=integer,
precision=integer,
required parameter rType="CHAR" | "NUMERIC",
type="BINARY" | "INT32" | "INT64" | "SAS" | "UNKNOWN" | "VARBINARY" | "VARCHAR"
}, {...}}
;
indicates a required parameter

Parameter Descriptions

append=TRUE | FALSE

specifies to add rows from the table to an existing table.

DefaultFALSE

caslib="string"

specifies the target caslib for the table.

columnar=TRUE | FALSE

specifies to create the in-memory table in columnar format.

DefaultFALSE

commitRecords=64-bit-integer

specifies the number of rows for the server to receive before committing the rows to the table.

AliasescommitRec
commitRecs
Default0
Minimum value0

commitSeconds=64-bit-integer

specifies the number of seconds for the server to receive rows before committing the rows to the table.

AliasescommitSec
commitSecs
Default0
Minimum value0

compress=TRUE | FALSE

when set to True, compresses the target table.

DefaultFALSE

copies=integer

specifies the number of redundant copies to make for the rows. Larger values provide greater fault tolerance for node failures but use more memory. Specifying 0 results in no fault tolerance in the event of a node failure.

Default1
Minimum value0

descending={integer-1 <, integer-2, ...>}

specifies to reverse the sort order for the specified variables so that results are sorted from the largest value to the smallest value. You must specify the variable names in the orderBy parameter.

label="string"

specifies the label to associate with the variable.

maxMBytes=64-bit-integer

specifies the maximum amount of physical memory, in megabytes, to allocate for the table. After this threshold, the server uses temporary files and operating system facilities for memory management.

Default16

memoryFormat="DVR" | "INHERIT" | "STANDARD"

specifies the memory format for the output table.

DefaultINHERIT
DVR

use the duplicate value reduction memory format. This memory format can reduce the memory consumption and file size when the input data contains duplicate values.

INHERIT

use the default memory format that is set for the server. By default, the server uses the standard memory format. If an administrator sets the CAS_DEFAULT_MEMORY_FORMAT environment variable to DVR, then the DVR memory format is set as the default for the server.

STANDARD

use the standard memory format.

orderBy={"variable-name-1" <, "variable-name-2", ...>}

specifies the variable names to use for ordering rows within partitions.

partition={"variable-name-1" <, "variable-name-2", ...>}

specifies the variable names to use as partitioning keys. The table is partitioned according to the formatted values of the specified variables.

promote=TRUE | FALSE

when set to True, the table is added with a global scope. This enables other sessions to access the table, subject to access controls. The target caslib must also have a global scope.

DefaultFALSE

* recLen=integer

specifies the length, in bytes, for a row.

Minimum value1

repeat=TRUE | FALSE

when set to True, the rows for the table are duplicated on every machine of a distributed server. Making duplicate copies of tables can be useful in cases like a dimension table that is used in a join.

DefaultFALSE

replace=TRUE | FALSE

when set to True, an existing table with the same name is overwritten.

DefaultFALSE

table="table-name"

specifies the output table name.

vars={{addtablevariable-1} <, {addtablevariable-2}, ...>}

specifies the attributes for each variable.

The addtablevariable value can be one or more of the following:

format="string"

specifies the format to apply to the variable.

formattedLength=integer

specifies the length of format field plus the length of the format precision.

label="string"

specifies the descriptive label for the variable.

* length=integer

specifies the unformatted length of the variable. This parameter applies to fixed-length character variables (type="CHAR") only.

Minimum value1
* name="string"

specifies the name for the variable.

nfd=integer

specifies the length of the format precision.

nfl=integer

specifies the length of the format field.

* offset=integer

specifies the offset of the variable within the record, in bytes. OBSOLETE.

Minimum value0
precision=integer

specifies the precision of a variable for varchar, varbinary, decimal or time data.

* rType="CHAR" | "NUMERIC"

specifies the base data type for the variable. OBSOLETE.

type="BINARY" | "INT32" | "INT64" | "SAS" | "UNKNOWN" | "VARBINARY" | "VARCHAR"

specifies the data type for the variable.

DefaultSAS

Result Descriptions

caslib

The result is a string. You can access the value from results.caslib.

tableName

The result is a string. You can access the value from results.tableName.

addTable Action

Add a table by sending it from the client to the server.

Note:The addTable action cannot be run from CASL, Python, and other clients in the same way that other actions like loadTable are run. Each client provides a client-specific function or method for transferring data to the server that runs the addTable action.

Lua Syntax

results, info = s:table_addTable{
append=true | false,
caslib="string",
columnar=true | false,
commitRecords=64-bit-integer,
commitSeconds=64-bit-integer,
compress=true | false,
copies=integer,
descending={integer-1 <, integer-2, ...>},
label="string",
maxMBytes=64-bit-integer,
orderBy={"variable-name-1" <, "variable-name-2", ...>},
partition={"variable-name-1" <, "variable-name-2", ...>},
promote=true | false,
required parameter recLen=integer,
repeat=true | false,
replace=true | false,
table="table-name",
vars={{
format="string",
label="string",
required parameter length=integer,
required parameter name="string",
nfd=integer,
nfl=integer,
required parameter offset=integer,
precision=integer,
required parameter rType="CHAR" | "NUMERIC",
type="BINARY" | "INT32" | "INT64" | "SAS" | "UNKNOWN" | "VARBINARY" | "VARCHAR"
}, {...}}
}
indicates a required parameter

Parameter Descriptions

append=true | false

specifies to add rows from the table to an existing table.

Defaultfalse

caslib="string"

specifies the target caslib for the table.

columnar=true | false

specifies to create the in-memory table in columnar format.

Defaultfalse

commitRecords=64-bit-integer

specifies the number of rows for the server to receive before committing the rows to the table.

AliasescommitRec
commitRecs
Default0
Minimum value0

commitSeconds=64-bit-integer

specifies the number of seconds for the server to receive rows before committing the rows to the table.

AliasescommitSec
commitSecs
Default0
Minimum value0

compress=true | false

when set to True, compresses the target table.

Defaultfalse

copies=integer

specifies the number of redundant copies to make for the rows. Larger values provide greater fault tolerance for node failures but use more memory. Specifying 0 results in no fault tolerance in the event of a node failure.

Default1
Minimum value0

descending={integer-1 <, integer-2, ...>}

specifies to reverse the sort order for the specified variables so that results are sorted from the largest value to the smallest value. You must specify the variable names in the orderBy parameter.

label="string"

specifies the label to associate with the variable.

maxMBytes=64-bit-integer

specifies the maximum amount of physical memory, in megabytes, to allocate for the table. After this threshold, the server uses temporary files and operating system facilities for memory management.

Default16

memoryFormat="DVR" | "INHERIT" | "STANDARD"

specifies the memory format for the output table.

DefaultINHERIT
DVR

use the duplicate value reduction memory format. This memory format can reduce the memory consumption and file size when the input data contains duplicate values.

INHERIT

use the default memory format that is set for the server. By default, the server uses the standard memory format. If an administrator sets the CAS_DEFAULT_MEMORY_FORMAT environment variable to DVR, then the DVR memory format is set as the default for the server.

STANDARD

use the standard memory format.

orderBy={"variable-name-1" <, "variable-name-2", ...>}

specifies the variable names to use for ordering rows within partitions.

partition={"variable-name-1" <, "variable-name-2", ...>}

specifies the variable names to use as partitioning keys. The table is partitioned according to the formatted values of the specified variables.

promote=true | false

when set to True, the table is added with a global scope. This enables other sessions to access the table, subject to access controls. The target caslib must also have a global scope.

Defaultfalse

* recLen=integer

specifies the length, in bytes, for a row.

Minimum value1

repeat=true | false

when set to True, the rows for the table are duplicated on every machine of a distributed server. Making duplicate copies of tables can be useful in cases like a dimension table that is used in a join.

Defaultfalse

replace=true | false

when set to True, an existing table with the same name is overwritten.

Defaultfalse

table="table-name"

specifies the output table name.

vars={{addtablevariable-1} <, {addtablevariable-2}, ...>}

specifies the attributes for each variable.

The addtablevariable value can be one or more of the following:

format="string"

specifies the format to apply to the variable.

formattedLength=integer

specifies the length of format field plus the length of the format precision.

label="string"

specifies the descriptive label for the variable.

* length=integer

specifies the unformatted length of the variable. This parameter applies to fixed-length character variables (type="CHAR") only.

Minimum value1
* name="string"

specifies the name for the variable.

nfd=integer

specifies the length of the format precision.

nfl=integer

specifies the length of the format field.

* offset=integer

specifies the offset of the variable within the record, in bytes. OBSOLETE.

Minimum value0
precision=integer

specifies the precision of a variable for varchar, varbinary, decimal or time data.

* rType="CHAR" | "NUMERIC"

specifies the base data type for the variable. OBSOLETE.

type="BINARY" | "INT32" | "INT64" | "SAS" | "UNKNOWN" | "VARBINARY" | "VARCHAR"

specifies the data type for the variable.

DefaultSAS

Result Descriptions

caslib

The result is a string. You can access the value from results.caslib.

tableName

The result is a string. You can access the value from results.tableName.

addTable Action

Add a table by sending it from the client to the server.

Note:The addTable action cannot be run from CASL, Python, and other clients in the same way that other actions like loadTable are run. Each client provides a client-specific function or method for transferring data to the server that runs the addTable action.

Python Syntax

results= s.table.addTable(
append=True | False,
caslib="string",
columnar=True | False,
commitRecords=64-bit-integer,
commitSeconds=64-bit-integer,
compress=True | False,
copies=integer,
descending=[integer-1 <, integer-2, ...>],
label="string",
maxMBytes=64-bit-integer,
orderBy=["variable-name-1" <, "variable-name-2", ...>],
partition=["variable-name-1" <, "variable-name-2", ...>],
promote=True | False,
required parameter recLen=integer,
repeat=True | False,
replace=True | False,
table="table-name",
vars=[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "length":integer,
required parameter "name":"string",
"nfd":integer,
"nfl":integer,
required parameter "offset":integer,
"precision":integer,
required parameter "rType":"CHAR" | "NUMERIC",
"type":"BINARY" | "INT32" | "INT64" | "SAS" | "UNKNOWN" | "VARBINARY" | "VARCHAR"
}<, {...}>]
)
indicates a required parameter

Parameter Descriptions

append=True | False

specifies to add rows from the table to an existing table.

DefaultFalse

caslib="string"

specifies the target caslib for the table.

columnar=True | False

specifies to create the in-memory table in columnar format.

DefaultFalse

commitRecords=64-bit-integer

specifies the number of rows for the server to receive before committing the rows to the table.

AliasescommitRec
commitRecs
Default0
Minimum value0

commitSeconds=64-bit-integer

specifies the number of seconds for the server to receive rows before committing the rows to the table.

AliasescommitSec
commitSecs
Default0
Minimum value0

compress=True | False

when set to True, compresses the target table.

DefaultFalse

copies=integer

specifies the number of redundant copies to make for the rows. Larger values provide greater fault tolerance for node failures but use more memory. Specifying 0 results in no fault tolerance in the event of a node failure.

Default1
Minimum value0

descending=[integer-1 <, integer-2, ...>]

specifies to reverse the sort order for the specified variables so that results are sorted from the largest value to the smallest value. You must specify the variable names in the orderBy parameter.

label="string"

specifies the label to associate with the variable.

maxMBytes=64-bit-integer

specifies the maximum amount of physical memory, in megabytes, to allocate for the table. After this threshold, the server uses temporary files and operating system facilities for memory management.

Default16

memoryFormat="DVR" | "INHERIT" | "STANDARD"

specifies the memory format for the output table.

DefaultINHERIT
DVR

use the duplicate value reduction memory format. This memory format can reduce the memory consumption and file size when the input data contains duplicate values.

INHERIT

use the default memory format that is set for the server. By default, the server uses the standard memory format. If an administrator sets the CAS_DEFAULT_MEMORY_FORMAT environment variable to DVR, then the DVR memory format is set as the default for the server.

STANDARD

use the standard memory format.

orderBy=["variable-name-1" <, "variable-name-2", ...>]

specifies the variable names to use for ordering rows within partitions.

partition=["variable-name-1" <, "variable-name-2", ...>]

specifies the variable names to use as partitioning keys. The table is partitioned according to the formatted values of the specified variables.

promote=True | False

when set to True, the table is added with a global scope. This enables other sessions to access the table, subject to access controls. The target caslib must also have a global scope.

DefaultFalse

* recLen=integer

specifies the length, in bytes, for a row.

Minimum value1

repeat=True | False

when set to True, the rows for the table are duplicated on every machine of a distributed server. Making duplicate copies of tables can be useful in cases like a dimension table that is used in a join.

DefaultFalse

replace=True | False

when set to True, an existing table with the same name is overwritten.

DefaultFalse

table="table-name"

specifies the output table name.

vars=[{addtablevariable-1} <, {addtablevariable-2}, ...>]

specifies the attributes for each variable.

The addtablevariable value can be one or more of the following:

"format":"string"

specifies the format to apply to the variable.

"formattedLength":integer

specifies the length of format field plus the length of the format precision.

"label":"string"

specifies the descriptive label for the variable.

* "length":integer

specifies the unformatted length of the variable. This parameter applies to fixed-length character variables (type="CHAR") only.

Minimum value1
* "name":"string"

specifies the name for the variable.

"nfd":integer

specifies the length of the format precision.

"nfl":integer

specifies the length of the format field.

* "offset":integer

specifies the offset of the variable within the record, in bytes. OBSOLETE.

Minimum value0
"precision":integer

specifies the precision of a variable for varchar, varbinary, decimal or time data.

* "rType":"CHAR" | "NUMERIC"

specifies the base data type for the variable. OBSOLETE.

"type":"BINARY" | "INT32" | "INT64" | "SAS" | "UNKNOWN" | "VARBINARY" | "VARCHAR"

specifies the data type for the variable.

DefaultSAS

Result Descriptions

caslib

The result is a string. You can access the value from results.caslib.

tableName

The result is a string. You can access the value from results.tableName.

addTable Action

Add a table by sending it from the client to the server.

Note:The addTable action cannot be run from CASL, Python, and other clients in the same way that other actions like loadTable are run. Each client provides a client-specific function or method for transferring data to the server that runs the addTable action.

R Syntax

results <– cas.table.addTable(s,
append=TRUE | FALSE,
caslib="string",
columnar=TRUE | FALSE,
commitRecords=64-bit-integer,
commitSeconds=64-bit-integer,
compress=TRUE | FALSE,
copies=integer,
descending=list(integer-1 <, integer-2, ...>),
label="string",
maxMBytes=64-bit-integer,
orderBy=list("variable-name-1" <, "variable-name-2", ...>),
partition=list("variable-name-1" <, "variable-name-2", ...>),
promote=TRUE | FALSE,
required parameter recLen=integer,
repeat=TRUE | FALSE,
replace=TRUE | FALSE,
table="table-name",
vars=list( list(
format="string",
label="string",
required parameter length=integer,
required parameter name="string",
nfd=integer,
nfl=integer,
required parameter offset=integer,
precision=integer,
required parameter rType="CHAR" | "NUMERIC",
type="BINARY" | "INT32" | "INT64" | "SAS" | "UNKNOWN" | "VARBINARY" | "VARCHAR"
) <, list(...)>)
)
indicates a required parameter

Parameter Descriptions

append=TRUE | FALSE

specifies to add rows from the table to an existing table.

DefaultFALSE

caslib="string"

specifies the target caslib for the table.

columnar=TRUE | FALSE

specifies to create the in-memory table in columnar format.

DefaultFALSE

commitRecords=64-bit-integer

specifies the number of rows for the server to receive before committing the rows to the table.

AliasescommitRec
commitRecs
Default0
Minimum value0

commitSeconds=64-bit-integer

specifies the number of seconds for the server to receive rows before committing the rows to the table.

AliasescommitSec
commitSecs
Default0
Minimum value0

compress=TRUE | FALSE

when set to True, compresses the target table.

DefaultFALSE

copies=integer

specifies the number of redundant copies to make for the rows. Larger values provide greater fault tolerance for node failures but use more memory. Specifying 0 results in no fault tolerance in the event of a node failure.

Default1
Minimum value0

descending=list(integer-1 <, integer-2, ...>)

specifies to reverse the sort order for the specified variables so that results are sorted from the largest value to the smallest value. You must specify the variable names in the orderBy parameter.

label="string"

specifies the label to associate with the variable.

maxMBytes=64-bit-integer

specifies the maximum amount of physical memory, in megabytes, to allocate for the table. After this threshold, the server uses temporary files and operating system facilities for memory management.

Default16

memoryFormat="DVR" | "INHERIT" | "STANDARD"

specifies the memory format for the output table.

DefaultINHERIT
DVR

use the duplicate value reduction memory format. This memory format can reduce the memory consumption and file size when the input data contains duplicate values.

INHERIT

use the default memory format that is set for the server. By default, the server uses the standard memory format. If an administrator sets the CAS_DEFAULT_MEMORY_FORMAT environment variable to DVR, then the DVR memory format is set as the default for the server.

STANDARD

use the standard memory format.

orderBy=list("variable-name-1" <, "variable-name-2", ...>)

specifies the variable names to use for ordering rows within partitions.

partition=list("variable-name-1" <, "variable-name-2", ...>)

specifies the variable names to use as partitioning keys. The table is partitioned according to the formatted values of the specified variables.

promote=TRUE | FALSE

when set to True, the table is added with a global scope. This enables other sessions to access the table, subject to access controls. The target caslib must also have a global scope.

DefaultFALSE

* recLen=integer

specifies the length, in bytes, for a row.

Minimum value1

repeat=TRUE | FALSE

when set to True, the rows for the table are duplicated on every machine of a distributed server. Making duplicate copies of tables can be useful in cases like a dimension table that is used in a join.

DefaultFALSE

replace=TRUE | FALSE

when set to True, an existing table with the same name is overwritten.

DefaultFALSE

table="table-name"

specifies the output table name.

vars=list( list(addtablevariable-1) <, list(addtablevariable-2), ...>)

specifies the attributes for each variable.

The addtablevariable value can be one or more of the following:

format="string"

specifies the format to apply to the variable.

formattedLength=integer

specifies the length of format field plus the length of the format precision.

label="string"

specifies the descriptive label for the variable.

* length=integer

specifies the unformatted length of the variable. This parameter applies to fixed-length character variables (type="CHAR") only.

Minimum value1
* name="string"

specifies the name for the variable.

nfd=integer

specifies the length of the format precision.

nfl=integer

specifies the length of the format field.

* offset=integer

specifies the offset of the variable within the record, in bytes. OBSOLETE.

Minimum value0
precision=integer

specifies the precision of a variable for varchar, varbinary, decimal or time data.

* rType="CHAR" | "NUMERIC"

specifies the base data type for the variable. OBSOLETE.

type="BINARY" | "INT32" | "INT64" | "SAS" | "UNKNOWN" | "VARBINARY" | "VARCHAR"

specifies the data type for the variable.

DefaultSAS

Result Descriptions

caslib

The result is a string. You can access the value from results.caslib.

tableName

The result is a string. You can access the value from results.tableName.

Last updated: September 20, 2022