Uninstalling UDFs

Teradata® Vantage User Guide

brand
Teradata Vantage
prodname
Teradata Vantage
vrm_release
1.0
category
User Guide
featnum
B700-4002-098K
To 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.