Table of Contents

Search

  1. Preface
  2. Introduction to Data Transformation
  3. Data Processor Transformation
  4. Wizard Input and Output Formats
  5. Relational Input and Output
  6. Using the IntelliScript Editor
  7. XMap
  8. Libraries
  9. Schema Object
  10. Command Line Interface
  11. Scripts
  12. Parsers
  13. Script Ports
  14. Document Processors
  15. Formats
  16. Data Holders
  17. Anchors
  18. Transformers
  19. Actions
  20. Serializers
  21. Mappers
  22. Locators, Keys, and Indexing
  23. Streamers
  24. Validators, Notifications, and Failure Handling
  25. Validation Rules
  26. Custom Script Components

AggregateValues

AggregateValues

The
AggregateValues
action performs a computation on an aggregate of a multiple-occurrence data holder.
The following table describes the properties of the
AggregateValues
action:
Property
Description
aggregation_function
Determines the function to perform on the aggregate. You can choose one of the following options:
  • AllEqual. Returns
    true
    if the values are all the same or
    false
    if they are not the same.
  • Count. Returns the number of occurrences of the data holder.
  • Join. Returns a list of all the values, separated by the separator specified in the
    separator
    property.
  • Sum. Returns the sum of the values.
AllEqual
Defines an option under the
aggregation_function
property.
Count
Defines an option under the
aggregation_function
property.
data_holder
Defines the data holder that stores the output.
disabled
Determines whether the Script ignores the component and all of the child components. Use this property to test, debug, and modify a Script. You can choose one of the following options:
  • Selected. The Script ignores the component.
  • Cleared. The Script applies the component.
The default is cleared.
include_empty_values
Determines whether the aggregate includes occurrences that contain no data.
  • Selected. The action includes the empty occurrences.
  • Cleared. The action ignores the empty occurrences.
Default is selected.
Join
Defines an option under the
aggregation_function
property.
name
A descriptive label for the component. This label appears in the log file and the
Events
view. Use the
name
property to identify the component that caused the event.
on_fail
The action to take if the component fails. You can choose one of the following options:
  • Cleared. Take no action.
  • CustomLog. Write to the user log.
  • LogError. Write an error message to the engine log.
  • LogInfo. Write an information message to the engine log.
  • LogWarning. Write a warning message to the engine log.
  • NotifyFailure. Send a notification.
Default is cleared. For more information about handling component failures, see Failure Handling.
optional
Determines whether a component failure causes the parent component to fail. You can choose one of the following options:
  • Selected. Component failure does not cause the parent component to fail.
  • Cleared. Component failure causes the parent component to fail.
Default is cleared. For more information about component failure, see Failure Handling.
phase
Determines when the Script processes the component. You can choose one of the following options:
  • initial. The Script processes the component during the initial phase.
  • main. The Script processes the component during the main phase.
  • final. The Script processes the component during the final phase.
For more information, see How a Parser Searches for Anchors.
Default is main.
remark
A user-defined comment that describes the purpose or action of the component.
root_element
Determines the data holder at the root of the XML branch containing the multiple-occurrence data holder. The
root_element
can be single-occurrence or multiple-occurrence.
sub_element
Determines the multiple-occurrence data holder for which the action computes an aggregate. If
sub_element
is not assigned, the action computes the aggregate of the
root_element
.
Sum
Defines an option under the
aggregation_function
property.
Depending on the
root_element
that you configure, the action can aggregate occurrences at different levels of branching. For example, an XML document has the structure:
<Company> <Division name="America"> <Employee>...<Employee> <Employee>...<Employee> <Employee>...<Employee> </Division> <Division name="Europe"> <Employee>...<Employee> <Employee>...<Employee> </Division> </Company>
If the
root_element
is
Company
, and you configure the action to count the occurrences of
Employee
, the action counts all
Employee
element that are descendents of
Company
. The action returns 5.
If the
root_element
is
Division
, the action counts the number of
Employee
occurrences in the
Division
that the transformation is currently processing. When the action processes
America
, it returns 3. When it processes
Europe
, it returns 2.


Updated March 18, 2021