When a stored procedure (or user-defined function) is implemented in the data warehouse and the same function is used for Intelligent Cubes or derived metrics, a function plug-in needs to be implemented. The stored procedure and the function plug-in can be wired together to make the integration seamless. With one Strategy function in the metadata, Strategy Intelligence Server can automatically invoke either a stored procedure or a function plug-in, depending on the usage and performance. The instructions below explain how to wire a function plug-in and a stored procedure, assuming a function plug-in and a stored procedure with same functionality are available.
SQL Pattern
SQL Pattern is a Strategy function property. It determines how SQL is generated for the function. It is the "wire" we use and is normally in one of the following forms:
function_name(#0, #1, ...)
Adding SQL Pattern to an existing Function Plug-in
The following steps are for a use scenario: "And" Bitwise Operation. This bitwise operator is available in the database.

A function plug-in is implemented to support this same functionality in Strategy. After importing the function plug-in into the metadata (using the Import Functions feature located in Desktop under Schema), the BitAnd function is displayed in Desktop as shown below.

The following steps are to wire the "&" operation in the database with the "BitAnd" function in the metadata.





