Creating Function Maps

Function Map

A Function map object contains a function processing some incoming value (or values) according to the logic of the function selected. Centerprise provides a large number of built-in functions. They are broken by categories, for example, Math, Financial, Logical, SQL, Files, Date Time, General and others.

For example, you can use the PMT(rate, periods, numperiods, PV) financial function to return payment for an annuity based on periodic, fixed payments and a fixed interest rate.

All functions return a result value of some appropriate data type. The function result is available via the output ports on the object box. For example the ParseName function, which parses a full name into separate pieces, could look like this:

../_images/image62.jpg

To add a Function map, drag the Function object from the Maps group in the Flow toolbox and drop it on the dataflow.

To configure the properties of a Function object after it was added to the dataflow, right-click on it and select Properties from the context menu. The following properties are available:

Function Map Properties screen: provides the interface to help you select a function. You can select from the list of available functions arranged by Category, or you can display the entire list of available functions by selecting in the Category dropdown. Click on a function to select it.

General Options screen:

This screen shares the options common to most objects on the dataflow.

Examples

Logical Functions

IsNotNull(Object)

Returns Boolean TRUE if the specified object value does NOT contain a Null value. Otherwise returns FALSE.

Code

Boolean IsNotNull(Object value)

Parameters

Object value: An element of any data type specified by the expression.

Example

LoanID LoanLTV
1
2 70
3 80

For the table above, the following expressions would return the corresponding results where LoanID = 1:

Code Returns the value
IsNotNull(LoanLTV) FALSE

Date and Time Functions

Max(DateTime,DateTime)

Returns the greater of the two given DateTime instances.

Code

DateTime Max(DateTime first, DateTime second)

Parameters

DateTime first: Represents an instant in time, typically expressed as a date and time of day.

DateTime second: Represents an instant in time, typically expressed as a date and time of day.

Example

Code Returns the value
Max(08/07/1996 11:29:13AM, 12/07/2006 04:29:13AM) 12/07/2006 04:29:13AM

Usage

An example of a dataflow with NameParse and SplitString function is shown below:

../_images/blobid04.png