1.0 - Invoking UDFs - Teradata Vantage

Teradata® Vantage User Guide

Product
Teradata Vantage
Release Number
1.0
Published
January 2019
Language
English (United States)
Last Update
2020-03-11
dita:mapPath
hfp1506029122470.ditamap
dita:ditavalPath
hfp1506029122470.ditaval
PrerequisiteYou must install your UDF before you can invoke it.
  • Invoke your UDF as a function reference in a SQL query:
    SELECT * FROM { udf@coprocessor | udf_alias } (
      ON (SELECT * FROM MLE_function AS input_table_alias)
      USING MLE_function_arguments
    );
    For example:
    SELECT * FROM new_kmeans@coprocessor (
      ON (SELECT * FROM KmeansSample as InputTable)
      USING
      OutputTable ('kmeanssample_centroid')
      NumberK ('3')
      Threshold ('0.01')
      MxIterNum ('10')
    );