17.00 - 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.00
Release Date
September 2020
Content Type
Programming Reference
Publication ID
B035-1144-170K
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
;