About graph functions

Aggregate nodes and rollup nodes apply functions, such as Sum, Average, Max, and others, to the output. The function editor configures the functions assigned to the output schema field for either type of node.
Figure 3.   Function Editor
Image

The function editor consists of three main sections:

  • The function selector selects which function to assign to an output field. All available functions are contained in the function option list. Each function includes a function description.
  • The parameter selector is a table of fields available as argument data sources. Each row of the table represents a schema field from an incoming source. Each row includes the "namespaced" schema field name, which includes the name of the source graph node component followed by the schema field name, and the schema field data type.
    Figure 4.   Function parameters
    Image

    When the function cursor executes, the selected schema fields provide the argument data for the selected function.

  • When the Field Assignment editor executes, it assigns the results to the associated node schema output field. You type the field name into the output field text box editor. The function selection determines the field data type (the return type of the selected function).

    The assignment field editor includes a facets (BFacets) editor. In cases where the selected input fields of a function include different units (BUnit facet data) you need to select the unit type for the output field.

Example Facet assignment

As an example, assume you have two schema fields to use as data arguments for a Max function. The first field’s values are units of Celsius, while the second field’s values are units of Fahrenheit. To compare the two values, you must have a common unit type. You must also define the unit type of your result so that you can correctly interpret the data from the assigned function.

Figure 5.   Output field
Image

By assigning the unit type to the output field, you provide the common unit type used for comparison by the function at the time of cursor execution. You also determine the unit type used for the comparison result, which determines the actual value of the result data.