Expression Transformation

Expression transformation object defines an expression processing the incoming value (or values) according to the expression’s logic. For example, you may use expressions like the following to get the expression result based on the input values:

Input.Amortization + 120

AddDays(Input.AccountFundingDate, 30)

Floor(Input.NoteRate)

If (Input.IsFunded = “True”, 1, 0)

Month(Input.DueDate)

Some expressions do not depend on any user-provided input data, for example Now().

All expressions return an output value of an appropriate data type. The output value is available under the Output node on the object box.

To add an Expression transformation, drag the Expression object from the Transformations group in the Flow toolbox and drop it on the dataflow.

An example of what an Expression transformation object might look like is shown below.

../_images/image441.jpg

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

Meta Object Builder screen:

Meta Object Builder screen allows you to add or remove fields in the field layout, as well as select their data type. The fields added in Meta Object Builder will show in the Input node of the Expression object. The Input node can be connected to upstream dataflow objects in order to supply the field values used by the expression.

Expression Map Properties screen provides the interface to help you create your expression.

General Options screen:

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

Aggregates

Aggregate functions are available in many places throughout Centerprise, including Expression transformations, Data Quality Rules and Record Filter Expressions. Using aggregate functions, for instance, you can calculate the maximum loan amount among all records in a given collection.

To make sure your aggregate functions are properly formed, you need to specify paths relative to the collection (as opposed to root based paths). For instance, if you have a structure like this:

Customer(Id, Name)

SalesOrder(OrderId, Amount)

OrderDetail(Quantity, Price, Total)

your aggregate functions would look like this:

Customer.SalesOrder.Sum(Amount)

Customer.SalesOrder.OrderDetail(Quantity), and not Customer.SalesOrder.OrderDetail(Customer.SalesOrder.OrderDetail.Quantity)

Sample

A fragment of a dataflow with Expression objects is shown below:

../_images/blobid014.png

Usage

Using Expression Transformation to derive a value from one or more source values.