Ab Initio Component | ROLLUP : Part 1

 Purpose of ROLLUP

  • ROLLUP is used to process groups of input records that have the same key, generating one output record for each group. 

  • Typically, the output record is summary or aggregates the data in some way; for example, a simple ROLLUP can be used to calculate a sum or average of one or more input fields.

  • ROLLUP can also be used to select certain information from each group; for example, it might output the largest value in a field, or accumulate a vector of values that conform to specific criteria.

Two modes to use ROLLUP

You can use a ROLLUP component in two modes, depending on how you define the transform parameter:

1. Template mode — You define a simple rollup function that may include aggregation functions. Template mode is the most common/simple way to use ROLLUP.

2. Expanded mode — You create a transformation using an expanded rollup package. This mode allows for rollups that do not necessarily use regular aggregation functions.


Parameters for ROLLUP (Not all parameters are covered.)

 sorted-input(boolean, required)

  • This parameter to specifies whether the component accepts unsorted (or ungrouped) input.

  • If you want to process ungrouped input, set this parameter to False.

Default is True.

key-method (choice, optional)

  • This parameter determines the method by which the component determines the boundary between one group of records and the next. The choices are as follows:

1. Use key specifier — The component uses one or more of the fields in the input record as the grouping key.

2. Use key_change function — Instead of using fields from the input record to group the input, the component uses the key_change transform function to determine when a new group begins.


Default is Use key specifier.

key(key specifier, required when key-method is Use key specifier)

  • This parameter contain the name(s) of the key fields that the component can use to group or define groups of records.

 transformp(filename or string, required)

  • This parameter contains either the name of the file containing the types and transform functions, or a transform string.

output_without_input(choice, optional)

  • This parameter specifies the event that, when received, triggers the component to call the output_without_input function, if no input records have been received since the last such event or since the component started. The choices are as follows:

Never — The function will not be called.

At each computepoint — The function is called at each computepoint event.

At each checkpoint — The function is called at each checkpoint event.

At component shutdown — The function is called when the component is shutdown.

Default is Never.

No comments:

Post a Comment