Sets the schema of the output stream.
Syntax
tdr.SetOutputColDef( streamno, coldef )
Syntax Elements
- streamno
- Parameter type: integer
The output stream number.
- coldef
- Parameter type: listThe schema of a stream. This schema is a list with the number of columns and the definition of each column. Each definition includes the following column information:
- Type
Valid data type values are defined by the dtype_en enumeration in the sqltypes_td.h header file.
- Size (in bytes)
- Character type for textual fields:
- 1 for LATIN
- 2 for UNICODE
- Type
Usage Notes
This function is valid only if called from the contract function.
An error is raised if the function is called from the table operator.
Example: Set the Column Definitions of an Output Stream
This example sets the column definitions of an output stream with three attributes (COL1 int, COL2 real, COL3 varchar(30)).
stream <- 0; integer = list( datatype="INTEGER_DT", bytesize=4 ); real <- list( datatype="REAL_DT", bytesize=8 ); varchar30 <- list(datatype="VARCHAR_DT", charset="LATIN_CT", size.length=30); coldef <- list(COL1=integer, COL2=real, COL3=varchar30); tdr.SetOutputColDef(stream, coldef);