In a SELECT statement with a function mapping, each correlation_name, USING custom clause parameter, or OUT TABLE name that you specify must correspond to a correlation_name, USING custom clause parameter, or OUT TABLE name in the function mapping definition. For information on how to create a function mapping, see Teradata Vantageā¢ - SQL Data Definition Language Syntax and Examples, B035-1144.
The function mapping definition coxph for the function coxph on the server coprocessor is as follows:
CREATE FUNCTION MAPPING appl_view_db.coxph FOR coxph SERVER coprocessor MAP JSON ( '{ "function_version": "1.0" }') USING InputTable IN TABLE, CoefficientTable OUT TABLE, LinearPredictorTable OUT TABLE, TimeIntervalColumn, EventColumn, Threshold, MaxInterNum, FeatureColumns;
In the following SELECT statement, each correlation_name, USING custom clause parameter, or OUT TABLE name corresponds to a correlation_name, USING custom clause parameter, or OUT TABLE name in the function mapping definition.
SELECT * FROM appl_view_db.coxph ( ON appl_view_db.input_table AS inputtable PARTITION BY 1 OUTPUT TABLE CoefficientTable(coefficient_table) OUTPUT TABLE LinearPredictorTable(linearpredictor_table) USING FeatureColumns('c1','c2') TimeIntervalColumn('t1') EventColumn('e1') ) AS dt;