10.4.1.1 Parameters of the SQL Table Functions

The SQL table functions have some parameters in common and some functions have parameters that are unique to that function.

The parameters of the SQL table functions are the following.

Table 10-12 SQL Table Function Parameters

Parameter Description

INP_NAM

The name of a table or view that specifies the data to pass to the R function specified by the SCR_NAME parameter. If you use a table or view owned by another user, use the format <owner name>.<table/view name>. You must have read access to the specified table or view.

Note:

This argument is for all of the SQL table functions except rqEval2.

PAR_LST

A JSON string that contains additional parameters to pass to the user-defined R function specified by the SCR_NAME parameter. Special control arguments, which start with ore, are not passed to the function specified by SCR_NAME, instead control what happens before or after the invocation of the function. For example, to omit rows with missing values from input table, use: {"ore.na.omit":true}

See also: Special Control Arguments

OUT_FMT

An output table definition. The value of this argument can be NULL or a string that defines the structure of the R data.frame returned by the R function specified by SCR_NAME. The string can be a SELECT statement, 'XML', or 'PNG'.

The format of the output returned by the function.

It can be one of the following:
  • The name of a table or view to use as a prototype. If using a table or view owned by another user, use the format <owner name>.<table/view name>. You must have read access to the specified table or view.
  • A JSON string that specifies the column names and data types of the table returned by the function. Any image data is discarded.
  • The string 'XML', which specifies that the table returned contains a CLOB that is an XML string. The XML can contain both structured data and images, with structured or semi-structured R objects first, followed by the image or images generated by the R function.
  • The string 'PNG', which specifies that the table returned contains a BLOB that has the image or images generated by the R function. Images are returned as PNG bytes.

See also: Output Formats

GRP_COL

For the rqGroupEval2 function, the name of the grouping column.

ROW_NUM

For the rqRowEval2 function, the number of rows to pass to each invocation of the R function.

SCR_NAME

The name of a script in the OML4R script repository.

SCR_OWNER

The owner of a script in the OML4R script repository. The default value is NULL. If the value is NULL, search for the R script in the user's script repository.