Campaign Manager - Campaign Manager (Silverlight)


Expression tool

Use the Expression tool to create new results by manipulating existing data using a range of Engine tools and standard operators.

You require a good knowledge of Engine functions and some programming experience to make optimal use of this tool.

There are a large number of expressions that can be used in isolation and in combination to manipulate data. The following is a simple example that extracts the first four characters from the Postcode field to create a new field called Postal Area.

Procedure

  1. Drag the Expression tool to the Workspace or select it from the New menu on the Ribbon Bar. A new configurable expression is displayed.
  2. In the Display Name field, enter a name for the expression.

    If you save the tool as a template, this name will be used to display it in the Templates tab. The Display Name is also used in the Caption area if you insert the tool into a document.

  3. If you want the new column to be automatically indexed, select the Index Column check box. You should only index columns when necessary. For example, when engineered columns have > 250 discrete values, indexing can start to improve query performance.
Note: The default value for the Index Column check box is unselected. If you import a Campaign Manager document with the Index Column check box selected, the check box will revert to unselected. This is because when you import an existing engineering node, you are effectively creating a new one and the check box default of unselected is applied.
  1. Optional setting: if you want the resulting column to be made permanent in the database, expand the Optional icon. Enter a Table Column Name, this name will be used to display the column in the Data Explorer.
  2. Populate the remaining fields in the Settings area:
    • Target Table Level: Select the table that the new column will be created on. It must be at the same level or linked to any tables used in the Engine Expression field.
    • Filter Segment: Add filters if required using the standard drag and drop method. Note that all statistical functions performed on columns within an Engine database, for example, avg, mean and max, will always calculate on an entire column and never on a filtered subset. Even an 'If' statement in the expression tool using the stat functions will return the same results in the reproduction steps. To use a statistical function on a filtered set, a new column must be created that contains only the values of interest.
    • Expression Library: The drop-down list contains all Engine expressions that can be used. To search for an expression start typing and it will be displayed. Click the + button to add the expression to the Engine Expression workspace below, where you can then configure it.
    • Precision: For numeric fields this indicates the number of decimal places that will be displayed.
    • Additional Columns: This area allows you to embed Data Engineering or Predictive nodes to create columns 'on the fly' that can then be referenced in your expression. Each node that you add in this area is named sequentially @0, @1, @2 and so on. You can then reference specific engineered columns in your expression using these names.

      For example:

      LEFT(@0,4)

      or:

      IF(@1 > 6,"High Value","Low Value")

    • Engine Expression: This is the workspace area where you can create and configure expressions.
  3. Use the Test button to check the validity of the expression before processing it. A green tick is displayed when the text Expression is valid.
  Online & Instructor-Led Courses | Training Videos | Webinar Recordings
© Alterian. All Rights Reserved. | Privacy Policy | Legal Notice