17.10 - Example: Function Mapping with Concatenated Variable Substitution - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

The function definition usr_SVMSparse includes a concatenated variable expression for the string constant ValueColumn that consists of AttributeValueColumn and Maxnum.

If correlation variables AttributeValueColumn and Maxnum are both specified during function processing, ValueColumn is substituted.

CREATE FUNCTION MAPPING usr_SVMSparse
FOR SparseSVMTrainer SERVER TD_SERVER_DB.coprocessor
USING
InputTable IN TABLE ,
ModelTable OUT TABLE ,
IDColumn ,
SampleIdColumn ,
AttributeColumn(AttributeNameColumn) ,
LabelColumn(ResponseColumn),
ValueColumn(AttributeValueColumn||'_'||Maxnum),
HashProjection , "Hash" , HashBuckets ,
Cost , Bias , ClassWeights ,
MaxStep(Maxnum) ,
Epsilon , Seed , SequenceInputBy
;