Simple Analytics Action Set: Syntax

Provides actions for performing basic analytic functions

topK Action

Returns the top-K and bottom-K distinct values of each variable included in the variable list based on a user-specified ranking order.

See: Results
Get the Top-K and Bottom-K Distinct Values for Multiple Variables
simple.topK <result=results> <status=rc> /
attributes
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
bottomK=integer,
casOut
={
caslib="string",
compress=TRUE | FALSE,
indexVars={"variable-name-1" <, "variable-name-2", ...>},
label="string",
lifetime=64-bit-integer,
maxMemSize=64-bit-integer,
memoryFormat="DVR" | "INHERIT" | "STANDARD",
name="table-name",
promote=TRUE | FALSE,
replace=TRUE | FALSE,
replication=integer,
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE",
threadBlockSize=64-bit-integer,
timeStamp="string",
where={"string-1" <, "string-2", ...>}
},
freq="variable-name",
groupByLimit=64-bit-integer,
groupbyTable
={
casLib="string",
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters},
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter name="table-name",
where="where-expression"
},
includeMisc=TRUE | FALSE,
includeMissing=TRUE | FALSE,
inputs
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
maxTie=integer,
raw=TRUE | FALSE,
required parameter table
={
caslib="string",
computedOnDemand=TRUE | FALSE,
computedVars
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
computedVarsProgram="string",
dataSourceOptions={key-1=any-list-or-data-type-1 <, key-2=any-list-or-data-type-2, ...>},
groupBy
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
groupByMode="NOSORT" | "REDISTRIBUTE",
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter name="table-name",
orderBy
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
singlePass=TRUE | FALSE,
vars
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
where="where-expression",
whereTable
={
casLib="string"
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
required parameter name="table-name"
vars
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}}
where="where-expression"
}
},
tieEps=double,
topK=integer,
weight="variable-name"
;
indicates a required parameter

Summary: Input and Output Tables

If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

 groupbyTable

specifies an input table that contains the groups to use in a group-by analysis.

required parametertable

specifies the table name, caslib, and other common parameters.

Parameters for Creating Output Tables

Parameter

Subparameter

Description

 casOut

specifies the settings for an output table.

Parameter Descriptions

aggregator="MAX" | "MEAN" | "MIN" | "N" | "SUM"

specifies the aggregator for which the variables in the weight parameter are rolled up into rank order score, if the weight parameter is specified.

Aliasagg
DefaultSUM
MAX

specifies the maximum value.

MEAN

specifies the arithmetic mean.

MIN

specifies the minimum value.

N

specifies the number of observations.

SUM

specifies the sum of nonmissing values.

attributes={{casinvardesc-1} <, {casinvardesc-2}, ...>}

specifies the variable attributes.

For more information about specifying the attributes parameter, see the common casinvardesc parameter.

Aliasesattribute
attrs
attr
varAttrs

bottomK=integer

specifies the maximum number of distinct values included in the bottom-K list.

Aliasesk2
btmK
Default1
Range0–MACINT

casOut={casouttable}

specifies the settings for an output table.

For more information about specifying the casOut parameter, see the common casouttable parameter.

freq="variable-name"

specifies the numeric frequency variable used to compute the rank order score of a distinct value.

Aliasfrequency

groupByLimit=64-bit-integer

specifies the maximum number of levels in a group-by set. When the server determines this number of levels, the server stops and does not return a result. Specify this parameter if you want to avoid creating large result sets in group-by operations.

Minimum value1

groupbyTable={groupbytable}

specifies an input table that contains the groups to use in a group-by analysis.

Long formgroupbyTable={name="table-name"}
Shortcut formgroupbyTable="table-name"

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

casLib="string"

specifies the caslib for the filter table. By default, the active caslib is used.

dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}

specifies data source options.

Aliasesoptions
dataSource

For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter.

importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}

specifies the settings for reading a table from a data source.

Aliasimport

For more information about specifying the importOptions parameter, see the common importOptions parameter.

* name="table-name"

specifies the name of the filter table.

where="where-expression"

specifies an expression for subsetting the data from the filter table.

includeMisc=TRUE | FALSE

when set to True, miscellaneous information is included in the result.

DefaultTRUE

includeMissing=TRUE | FALSE

when set to True, missing values are included in the determination of the top-K and bottom-K distinct values.

DefaultTRUE

inputs={{casinvardesc-1} <, {casinvardesc-2}, ...>}

specifies the input variables for the analysis.

For more information about specifying the inputs parameter, see the common casinvardesc parameter.

Aliasinput

maxTie=integer

specifies maximum number of distinct values to be included in the result whose ranking score is tied with that of the Kth distinct value.

Default0
Range0–MACINT

raw=TRUE | FALSE

when set to True, the raw values are used for the variables.

DefaultFALSE

* table={castable}

specifies the table name, caslib, and other common parameters.

For more information about specifying the table parameter, see the common castable parameter.

tieEps=double

specifies the epsilon used to determine tied ranking scores.

Default0
Range0–MACBIG

topK=integer

specifies the maximum number of distinct values included in the top-K list.

Aliask1
Default1
Range0–MACINT

weight="variable-name"

specifies the numeric weight variable used to compute the result set.

topK Action

Returns the top-K and bottom-K distinct values of each variable included in the variable list based on a user-specified ranking order.

See: Results
Get the Top-K and Bottom-K Distinct Values for Multiple Variables
results, info = s:simple_topK{
attributes
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
bottomK=integer,
casOut
={
caslib="string",
compress=true | false,
indexVars={"variable-name-1" <, "variable-name-2", ...>},
label="string",
lifetime=64-bit-integer,
maxMemSize=64-bit-integer,
memoryFormat="DVR" | "INHERIT" | "STANDARD",
name="table-name",
promote=true | false,
replace=true | false,
replication=integer,
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE",
threadBlockSize=64-bit-integer,
timeStamp="string",
where={"string-1" <, "string-2", ...>}
},
freq="variable-name",
groupByLimit=64-bit-integer,
groupbyTable
={
casLib="string",
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters},
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter name="table-name",
where="where-expression"
},
includeMisc=true | false,
includeMissing=true | false,
inputs
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
maxTie=integer,
raw=true | false,
required parameter table
={
caslib="string",
computedOnDemand=true | false,
computedVars
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
computedVarsProgram="string",
dataSourceOptions={key-1=any-list-or-data-type-1 <, key-2=any-list-or-data-type-2, ...>},
groupBy
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
groupByMode="NOSORT" | "REDISTRIBUTE",
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter name="table-name",
orderBy
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
singlePass=true | false,
vars
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}},
where="where-expression",
whereTable
={
casLib="string"
dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
required parameter name="table-name"
vars
={{
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
}, {...}}
where="where-expression"
}
},
tieEps=double,
topK=integer,
weight="variable-name"
}
indicates a required parameter

Summary: Input and Output Tables

If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

 groupbyTable

specifies an input table that contains the groups to use in a group-by analysis.

required parametertable

specifies the table name, caslib, and other common parameters.

Parameters for Creating Output Tables

Parameter

Subparameter

Description

 casOut

specifies the settings for an output table.

Parameter Descriptions

aggregator="MAX" | "MEAN" | "MIN" | "N" | "SUM"

specifies the aggregator for which the variables in the weight parameter are rolled up into rank order score, if the weight parameter is specified.

Aliasagg
DefaultSUM
MAX

specifies the maximum value.

MEAN

specifies the arithmetic mean.

MIN

specifies the minimum value.

N

specifies the number of observations.

SUM

specifies the sum of nonmissing values.

attributes={{casinvardesc-1} <, {casinvardesc-2}, ...>}

specifies the variable attributes.

For more information about specifying the attributes parameter, see the common casinvardesc parameter.

Aliasesattribute
attrs
attr
varAttrs

bottomK=integer

specifies the maximum number of distinct values included in the bottom-K list.

Aliasesk2
btmK
Default1
Range0–MACINT

casOut={casouttable}

specifies the settings for an output table.

For more information about specifying the casOut parameter, see the common casouttable parameter.

freq="variable-name"

specifies the numeric frequency variable used to compute the rank order score of a distinct value.

Aliasfrequency

groupByLimit=64-bit-integer

specifies the maximum number of levels in a group-by set. When the server determines this number of levels, the server stops and does not return a result. Specify this parameter if you want to avoid creating large result sets in group-by operations.

Minimum value1

groupbyTable={groupbytable}

specifies an input table that contains the groups to use in a group-by analysis.

Long formgroupbyTable={name="table-name"}
Shortcut formgroupbyTable="table-name"

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

casLib="string"

specifies the caslib for the filter table. By default, the active caslib is used.

dataSourceOptions={adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}

specifies data source options.

Aliasesoptions
dataSource

For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter.

importOptions={fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}

specifies the settings for reading a table from a data source.

Aliasimport

For more information about specifying the importOptions parameter, see the common importOptions parameter.

* name="table-name"

specifies the name of the filter table.

where="where-expression"

specifies an expression for subsetting the data from the filter table.

includeMisc=true | false

when set to True, miscellaneous information is included in the result.

Defaulttrue

includeMissing=true | false

when set to True, missing values are included in the determination of the top-K and bottom-K distinct values.

Defaulttrue

inputs={{casinvardesc-1} <, {casinvardesc-2}, ...>}

specifies the input variables for the analysis.

For more information about specifying the inputs parameter, see the common casinvardesc parameter.

Aliasinput

maxTie=integer

specifies maximum number of distinct values to be included in the result whose ranking score is tied with that of the Kth distinct value.

Default0
Range0–MACINT

raw=true | false

when set to True, the raw values are used for the variables.

Defaultfalse

* table={castable}

specifies the table name, caslib, and other common parameters.

For more information about specifying the table parameter, see the common castable parameter.

tieEps=double

specifies the epsilon used to determine tied ranking scores.

Default0
Range0–MACBIG

topK=integer

specifies the maximum number of distinct values included in the top-K list.

Aliask1
Default1
Range0–MACINT

weight="variable-name"

specifies the numeric weight variable used to compute the result set.

topK Action

Returns the top-K and bottom-K distinct values of each variable included in the variable list based on a user-specified ranking order.

See: Results
Get the Top-K and Bottom-K Distinct Values for Multiple Variables
results=s.simple.topK(
attributes
=[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
bottomK=integer,
casOut
={
"caslib":"string",
"compress":True | False,
"indexVars":["variable-name-1" <, "variable-name-2", ...>],
"label":"string",
"lifetime":64-bit-integer,
"maxMemSize":64-bit-integer,
"memoryFormat":"DVR" | "INHERIT" | "STANDARD",
"name":"table-name",
"promote":True | False,
"replace":True | False,
"replication":integer,
"tableRedistUpPolicy":"DEFER" | "NOREDIST" | "REBALANCE",
"threadBlockSize":64-bit-integer,
"timeStamp":"string",
"where":["string-1" <, "string-2", ...>]
},
freq="variable-name",
groupByLimit=64-bit-integer,
groupbyTable
={
"casLib":"string",
"dataSourceOptions":{adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters},
"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter "name":"table-name",
"where":"where-expression"
},
includeMisc=True | False,
includeMissing=True | False,
inputs
=[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
maxTie=integer,
raw=True | False,
required parameter table
={
"caslib":"string",
"computedOnDemand":True | False,
"computedVars"
:[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"computedVarsProgram":"string",
"dataSourceOptions":{"key-1":{any-list-or-data-type-1} <, "key-2":{any-list-or-data-type-2}, ...>},
"groupBy"
:[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"groupByMode":"NOSORT" | "REDISTRIBUTE",
"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters},
required parameter "name":"table-name",
"orderBy"
:[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"singlePass":True | False,
"vars"
:[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>],
"where":"where-expression",
"whereTable"
:{
"casLib":"string"
"dataSourceOptions":{adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}
"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}
required parameter "name":"table-name"
"vars"
:[{
"format":"string",
"formattedLength":integer,
"label":"string",
required parameter "name":"variable-name",
"nfd":integer,
"nfl":integer
}<, {...}>]
"where":"where-expression"
}
},
tieEps=double,
topK=integer,
weight="variable-name"
)
indicates a required parameter

Summary: Input and Output Tables

If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

 groupbyTable

specifies an input table that contains the groups to use in a group-by analysis.

required parametertable

specifies the table name, caslib, and other common parameters.

Parameters for Creating Output Tables

Parameter

Subparameter

Description

 casOut

specifies the settings for an output table.

Parameter Descriptions

aggregator="MAX" | "MEAN" | "MIN" | "N" | "SUM"

specifies the aggregator for which the variables in the weight parameter are rolled up into rank order score, if the weight parameter is specified.

Aliasagg
DefaultSUM
MAX

specifies the maximum value.

MEAN

specifies the arithmetic mean.

MIN

specifies the minimum value.

N

specifies the number of observations.

SUM

specifies the sum of nonmissing values.

attributes=[{casinvardesc-1} <, {casinvardesc-2}, ...>]

specifies the variable attributes.

For more information about specifying the attributes parameter, see the common casinvardesc parameter.

Aliasesattribute
attrs
attr
varAttrs

bottomK=integer

specifies the maximum number of distinct values included in the bottom-K list.

Aliasesk2
btmK
Default1
Range0–MACINT

casOut={casouttable}

specifies the settings for an output table.

For more information about specifying the casOut parameter, see the common casouttable parameter.

freq="variable-name"

specifies the numeric frequency variable used to compute the rank order score of a distinct value.

Aliasfrequency

groupByLimit=64-bit-integer

specifies the maximum number of levels in a group-by set. When the server determines this number of levels, the server stops and does not return a result. Specify this parameter if you want to avoid creating large result sets in group-by operations.

Minimum value1

groupbyTable={groupbytable}

specifies an input table that contains the groups to use in a group-by analysis.

Long formgroupbyTable={"name":"table-name"}
Shortcut formgroupbyTable="table-name"

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

"casLib":"string"

specifies the caslib for the filter table. By default, the active caslib is used.

"dataSourceOptions":{adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters}

specifies data source options.

Aliasesoptions
dataSource

For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter.

"importOptions":{"fileType":"ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters}

specifies the settings for reading a table from a data source.

Aliasimport_

For more information about specifying the importOptions parameter, see the common importOptions parameter.

* "name":"table-name"

specifies the name of the filter table.

"where":"where-expression"

specifies an expression for subsetting the data from the filter table.

includeMisc=True | False

when set to True, miscellaneous information is included in the result.

DefaultTrue

includeMissing=True | False

when set to True, missing values are included in the determination of the top-K and bottom-K distinct values.

DefaultTrue

inputs=[{casinvardesc-1} <, {casinvardesc-2}, ...>]

specifies the input variables for the analysis.

For more information about specifying the inputs parameter, see the common casinvardesc parameter.

Aliasinput

maxTie=integer

specifies maximum number of distinct values to be included in the result whose ranking score is tied with that of the Kth distinct value.

Default0
Range0–MACINT

raw=True | False

when set to True, the raw values are used for the variables.

DefaultFalse

* table={castable}

specifies the table name, caslib, and other common parameters.

For more information about specifying the table parameter, see the common castable parameter.

tieEps=double

specifies the epsilon used to determine tied ranking scores.

Default0
Range0–MACBIG

topK=integer

specifies the maximum number of distinct values included in the top-K list.

Aliask1
Default1
Range0–MACINT

weight="variable-name"

specifies the numeric weight variable used to compute the result set.

topK Action

Returns the top-K and bottom-K distinct values of each variable included in the variable list based on a user-specified ranking order.

See: Results
Get the Top-K and Bottom-K Distinct Values for Multiple Variables
results <– cas.simple.topK(s,
attributes
=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
bottomK=integer,
casOut
=list(
caslib="string",
compress=TRUE | FALSE,
indexVars=list("variable-name-1" <, "variable-name-2", ...>),
label="string",
lifetime=64-bit-integer,
maxMemSize=64-bit-integer,
memoryFormat="DVR" | "INHERIT" | "STANDARD",
name="table-name",
promote=TRUE | FALSE,
replace=TRUE | FALSE,
replication=integer,
tableRedistUpPolicy="DEFER" | "NOREDIST" | "REBALANCE",
threadBlockSize=64-bit-integer,
timeStamp="string",
where=list("string-1" <, "string-2", ...>)
),
freq="variable-name",
groupByLimit=64-bit-integer,
groupbyTable
=list(
casLib="string",
dataSourceOptions=list(adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters),
importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters),
required parameter name="table-name",
where="where-expression"
),
includeMisc=TRUE | FALSE,
includeMissing=TRUE | FALSE,
inputs
=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
maxTie=integer,
raw=TRUE | FALSE,
required parameter table
=list(
caslib="string",
computedOnDemand=TRUE | FALSE,
computedVars
=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
computedVarsProgram="string",
dataSourceOptions=list(key-1=list(any-list-or-data-type-1) <, key-2=list(any-list-or-data-type-2), ...>),
groupBy
=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
groupByMode="NOSORT" | "REDISTRIBUTE",
importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters),
required parameter name="table-name",
orderBy
=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
singlePass=TRUE | FALSE,
vars
=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>),
where="where-expression",
whereTable
=list(
casLib="string"
dataSourceOptions=list(adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters)
importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DELIMITED" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SOUND" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters)
required parameter name="table-name"
vars
=list( list(
format="string",
formattedLength=integer,
label="string",
required parameter name="variable-name",
nfd=integer,
nfl=integer
) <, list(...)>)
where="where-expression"
)
),
tieEps=double,
topK=integer,
weight="variable-name"
)
indicates a required parameter

Summary: Input and Output Tables

If a row includes a subparameter, you can specify the name, caslib, and so on in the subparameter. Otherwise, you can specify the name, caslib, and so on in the parameter.

Parameters for Reading Input Tables

Parameter

Subparameter

Description

 groupbyTable

specifies an input table that contains the groups to use in a group-by analysis.

required parametertable

specifies the table name, caslib, and other common parameters.

Parameters for Creating Output Tables

Parameter

Subparameter

Description

 casOut

specifies the settings for an output table.

Parameter Descriptions

aggregator="MAX" | "MEAN" | "MIN" | "N" | "SUM"

specifies the aggregator for which the variables in the weight parameter are rolled up into rank order score, if the weight parameter is specified.

Aliasagg
DefaultSUM
MAX

specifies the maximum value.

MEAN

specifies the arithmetic mean.

MIN

specifies the minimum value.

N

specifies the number of observations.

SUM

specifies the sum of nonmissing values.

attributes=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)

specifies the variable attributes.

For more information about specifying the attributes parameter, see the common casinvardesc parameter.

Aliasesattribute
attrs
attr
varAttrs

bottomK=integer

specifies the maximum number of distinct values included in the bottom-K list.

Aliasesk2
btmK
Default1
Range0–MACINT

casOut=list(casouttable)

specifies the settings for an output table.

For more information about specifying the casOut parameter, see the common casouttable parameter.

freq="variable-name"

specifies the numeric frequency variable used to compute the rank order score of a distinct value.

Aliasfrequency

groupByLimit=64-bit-integer

specifies the maximum number of levels in a group-by set. When the server determines this number of levels, the server stops and does not return a result. Specify this parameter if you want to avoid creating large result sets in group-by operations.

Minimum value1

groupbyTable=list(groupbytable)

specifies an input table that contains the groups to use in a group-by analysis.

Long formgroupbyTable=list(name="table-name")
Shortcut formgroupbyTable="table-name"

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

casLib="string"

specifies the caslib for the filter table. By default, the active caslib is used.

dataSourceOptions=list(adls_noreq-parameters | bigquery-parameters | cas_noreq-parameters | clouddex-parameters | db2-parameters | dnfs-parameters | esp-parameters | fedsvr-parameters | gcs_noreq-parameters | hadoop-parameters | hana-parameters | impala-parameters | informix-parameters | jdbc-parameters | mongodb-parameters | mysql-parameters | odbc-parameters | oracle-parameters | path-parameters | postgres-parameters | redshift-parameters | s3-parameters | sapiq-parameters | sforce-parameters | singlestore_standard-parameters | snowflake-parameters | spark-parameters | spde-parameters | sqlserver-parameters | ss_noreq-parameters | teradata-parameters | vertica-parameters | yellowbrick-parameters)

specifies data source options.

Aliasesoptions
dataSource

For more information about specifying the dataSourceOptions parameter, see the common dataSourceOptions parameter.

importOptions=list(fileType="ANY" | "AUDIO" | "AUTO" | "BASESAS" | "CSV" | "DOCUMENT" | "DTA" | "ESP" | "EXCEL" | "FMT" | "HDAT" | "IMAGE" | "JMP" | "LASR" | "PARQUET" | "SPSS" | "VIDEO" | "XLS", fileType-specific-parameters)

specifies the settings for reading a table from a data source.

Aliasimport

For more information about specifying the importOptions parameter, see the common importOptions parameter.

* name="table-name"

specifies the name of the filter table.

where="where-expression"

specifies an expression for subsetting the data from the filter table.

includeMisc=TRUE | FALSE

when set to True, miscellaneous information is included in the result.

DefaultTRUE

includeMissing=TRUE | FALSE

when set to True, missing values are included in the determination of the top-K and bottom-K distinct values.

DefaultTRUE

inputs=list( list(casinvardesc-1) <, list(casinvardesc-2), ...>)

specifies the input variables for the analysis.

For more information about specifying the inputs parameter, see the common casinvardesc parameter.

Aliasinput

maxTie=integer

specifies maximum number of distinct values to be included in the result whose ranking score is tied with that of the Kth distinct value.

Default0
Range0–MACINT

raw=TRUE | FALSE

when set to True, the raw values are used for the variables.

DefaultFALSE

* table=list(castable)

specifies the table name, caslib, and other common parameters.

For more information about specifying the table parameter, see the common castable parameter.

tieEps=double

specifies the epsilon used to determine tied ranking scores.

Default0
Range0–MACBIG

topK=integer

specifies the maximum number of distinct values included in the top-K list.

Aliask1
Default1
Range0–MACINT

weight="variable-name"

specifies the numeric weight variable used to compute the result set.

Last updated: July 15, 2026