DROP FUNCTION (DMF)

Removes the specified data metric function (DMF) from the current or specified schema.

Syntax

DROP FUNCTION [ IF EXISTS ] <name>(
TABLE(  <arg_data_type> [ , ... ] ) [ , TABLE( <arg_data_type> [ , ... ] ) ]
)

Parameters

name

Identifier for the DMF to drop.

If the identifier contains spaces or special characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

For more information, see Identifier requirements.

TABLE( arg_data_type [ , ... ] ) [ , TABLE( arg_data_type [ , ... ] ) ]

Specifies the data type of the column arguments for the DMF. The data types are necessary because DMFs support name overloading (that is, two DMFs in the same schema can have the same name), and the data types of the arguments are used to identify the DMF you want to drop.

Access control requirements

PrivilegeObjectNotes
OWNERSHIPData metric function

Usage notes

  • When the IF EXISTS clause is specified and the target object doesn’t exist, the command completes successfully without returning an error.

Example

Drop a custom DMF from the system:

DROP FUNCTION governance.dmfs.count_positive_numbers(
  TABLE(
    NUMBER, NUMBER, NUMBER
  )
);