Uninstalling UDFs - Teradata Vantage

Teradata Vantageā„¢ User Guide

Product
Teradata Vantage
Release Number
1.1
Published
May 2020
Language
English (United States)
Last Update
2020-05-28
dita:mapPath
ioz1543440393126.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4002
lifecycle
previous
Product Category
Teradata Vantage
PrerequisiteTo uninstall a UDF, you must own it.
  1. Uninstall the UDF from ML Engine:
    • To uninstall the UDF from the default schema:

      CALL PM.REMOVE_AFUNCTION ('sql_identifier');

    • To uninstall the UDF from the public schema:

      CALL PM.REMOVE_AFUNCTION_FROM_PUBLIC ('sql_identifier');

    The sql_identifier is the SQL identifier of the UDF, from Installing UDFs.
    Important:

    If this step does not succeed, do not do the next step. The user-installed file in Advanced SQL Engine is the only way to reference the associated function in ML Engine. If you uninstall the user-installed file without removing the associated function, you cannot uninstall the function without help from Teradata Customer Support.

    You can run PM.REMOVE_AFUNCTION successfully multiple times. PM.REMOVE_AFUNCTION can successfully complete even when starting from an inconsistent state (when some or no artifacts are present in either Advanced SQL Engine or ML Engine).

    If an installation artifact cannot be removed from Advanced SQL Engine or ML Engine, the uninstall fails.

  2. Uninstall the user-installed file corresponding to the UDF file from Advanced SQL Engine file system:
    CALL SYSUIF.REMOVE_FILE ('sql_identifier', 1);
    For information on the syntax of this command, see Teradata Vantageā„¢ - SQL Functions, Expressions, and Predicates, B035-1145.