How function mappings work in a federated system

When you submit queries to the federated server that contain one or more functions, the federated server checks for information about the mappings between the database functions and the data source functions.

The federated server checks two places for mapping information:
  • The wrapper. The data source wrapper contains the default function mappings.
  • The SYSCAT.FUNCMAPPINGS catalog view. This view contains entries you create that override or augment the default function mappings that are in the wrapper. It also contains new mappings that you create when there is no default function mapping. When multiple mappings can be applied to a function, the most recently created one is applied.
Function mapping options specify information about the function and the potential cost of processing a function at the data source. Function mapping options provide information such as:
  • Name of the remote data source function
  • The estimated number of instructions processed the first and last time that the data source function is invoked.
  • Estimated number of I/Os performed the first and last time that the data source function is invoked.
  • Estimated number of instructions processed per invocation of the data source function.

When you create a function mapping, you are mapping from a function or function template to a counterpart function at the data source. When a database counterpart function does not exist, or when you want to force the federated server to use the data source function, you can create a function template to act as the counterpart.