get*columnbyname()

Returns the value of a column identified by an expression evaluated at runtime.

Syntax

getbinarycolumnbyname ( name, colname )
getstringcolumnbyname ( name, colname )
getlongcolumnbyname ( name, colname )
getintegercolumnbyname ( name, colname )
getfloatcolumnbyname ( name, colname )
getdatecolumnbyname ( name, colname )
gettimestampcolumnbyname ( name, colname )
getbigdatetimecolumnbyname ( name, colname )
getintervalcolumnbyname ( name, colname )
getbooleancolumnbyname ( name, colname )

Parameters

name

The name of a stream or window.

colname

An expression that evaluates to the name of a column with the same datatype as the function, in the stream or window.

The colname argument for getstringcolumnbyname() would have a string, for example.

Usage

Returns the value of a column identified by an expression evaluated at runtime. The function takes a string for the name. The datatype of the colname arguments corresponds to the function type, such as a string for getstringcolumnbyname(). The function returns the same datatype as colname (as specified in the function's name).

If colname argument evaluates to NULL or the specified column does not exist in the associated window or stream, the function returns NULL and generates an error message.

Example

CREATE MEMORY STORE "memstore";
CREATE INPUT WINDOW iwin1 SCHEMA (a int, b string) 
PRIMARY KEY (a) MEMORY STORE "memstore";

If you assume that the input passed into iwin1 was (1, 'hello'), then getstringcolumnbyname ( iwin1, a ) would return 'hello'.