Uninstalling 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
dita:id
B700-4002
lifecycle
previous
Product Category
Teradata Vantage
PrerequisiteTo uninstall a UDF, you must own it.
  1. Uninstall the UDF from Teradata ML Engine:
    • To uninstall the UDF from the default schema:

      CALL PM.REMOVE_AFUNCTION ('sql_identifier', 1);

    • To uninstall the UDF from the public schema:

      CALL PM.REMOVE_AFUNCTION_FROM_PUBLIC ('sql_identifier', 0);

    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 Teradata SQL Engine is the only way to reference the associated function in the Teradata 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 Teradata SQL Engine or Teradata ML Engine).

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

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