Creating function mappings for all data source objects on a specific SSPD server in Data Virtualization
You can create a mapping to a function that is used by all data sources objects on a specific remote server.
Before you begin
- Data Virtualization Admin with authorization ID privileges.
About this task
When you create a function mapping for a specific server, the mapping can be used for that server type only.
You cannot override the existing function mappings or create new mappings for nonrelational data sources.
If you create mappings for one single function on both server type level and server level, then the mapping of server level will override the mapping of server type for that server.
For example:
CREATE FUNCTION MAPPING QPLEX_UPPER_1 FOR SYSIBM.UPPER(CHAR)SERVER TYPE QUERYPLEX_PREST OPTIONS (REMOTE_NAME 'UPPER(:1P)');
CREATE FUNCTION MAPPING QPLEX_UPPER_2 FOR SYSIBM.UPPER(CHAR) SERVER QPLEX OPTIONS (REMOTE_NAME 'UPPER2(:1P)', CID 'PREST10000');
QPLEX_UPPER_2 will be used for PREST10000.
FLUSH PACKAGE CACHE DYNAMIC;
Pre-requisite step
- Run the following command to get the
CIDfrom thedvsys.rdb_connectionstable:select cid, url from dvsys.rdb_connections; -
You can also find the CID from the web client. Go to to view the CID.
Procedure
CREATE FUNCTION MAPPING QPLEX_UPPER_2 FOR SYSIBM.UPPER(CHAR)
SERVER QPLEX
OPTIONS (REMOTE_NAME 'UPPER(:1P)', CID '<CID>');- For example, the CID is
PREST10000:
CREATE FUNCTION MAPPING QPLEX_UPPER_2 FOR SYSIBM.UPPER(CHAR) SERVER QPLEX OPTIONS (REMOTE_NAME 'UPPER(:1P)', CID 'PREST10000');
FLUSH PACKAGE CACHE DYNAMIC;