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> [ , ... ] ) )
Copy

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 ] [ , ...] )

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

Access control requirements¶

A role used to execute this SQL command must have the following privileges at a minimum:

Privilege

Object

Notes

OWNERSHIP

Data metric function

The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Example¶

Drop the DMF from the system:

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