Requirements for mapping user-defined functions

Before you can invoke a data source user-defined function in a federated system, the federated database must associate the data source function with a function specification stored in the global catalog on the federated server.

There are two conditions under which the federated database can associate a function specification with a data source function:
  • The federated database has a function whose signature corresponds to that of the signature of the data source function. A signature consists of a function name and function input parameters. Signatures correspond when both the following conditions are true:
    • They contain the same names and the same number of parameters
    • The data type of each parameter in one signature is the same as (or can be converted to) the data type of the corresponding parameter in the other signature.
  • If the federated database does not have a function with the requisite signature, you can define a function template that contains this signature. You then map the function template to the data source function that you want to invoke.

The settings for function mappings are stored in the SYSCAT.FUNCMAPPINGS catalog view.