g_ETLPipelineSteps_AggregateCursor
AggregateCursor
Use the Aggregate cursor to read and batch data from the model class instances.
Properties
attributes : stringThe list of attributes that the cursor passes on to the next step in the pipeline.
Simple attributes, fields of complex attributes, and aggreate values can all be specified.- Example
A list of simple attributes: '(firstName lastName)
A list with a complex attribute: '(firstName (homeAddress city))
A list defining an aggregate value: '(firstName (: totalHoldings (sum (@ holdings value))))
batchSize : stringExpression specifying the number of records to include in each batch of data.
- Example
2000 and (* 20 100) are both valid values.
caption : stringString identifier for caption display in the UI.
class : stringThe class object that the cursor will read.
description : stringA description for this cursor. This text is displayed as an element note in the ETL diagram.
groupBy : stringThis expression specifies the data group against which you want to run the aggregating operation.
- Example
If the attributes property contains '(firstName (: totalHoldings (sum (@ holdings value)))), then setting the Group By value to '((@)) indicates that you want to sum the holidings by person.
having : stringAn expression to use aggregate values to restrict the set of class instances that the cursor reads.
You can specify the aggregation directly in this expression, or you can rely on an aggregate variable defined in the attributes clause.- Example
For example, (> (count (@ addresses)) 1) causes the cursor to supply data from only those classes that have more than one address.
If the attributes property contains '(firstName (: totalHoldings (sum (@ holdings value)))), then (> totalHoldings 20000) restricts the results only to classes whose calculated totalHoldings are greater than 20000.
layout : stringThis attribute captures the UI layout information for rendering the model in the editor. The values change as users moves the element in the editor.
name : stringThe cursor name. This name is diplayed on the diagram.
orderBy : stringA Scheme expression that controls the sorting of the data the cursor passes.
The syntax of the expression is '(((first_sort_dimension) . #t) ((second_sort_dimension) . #t) ((nth_sort_dimension) . #t)) Use #t to sort in ascending order, and #f to specify a descending order.- Example
A cursor reads from the Person class with the following order by information: '(((@ homeAddress city) . #t) ((@ firstName) . #t))
The data is sorted first by the city name in the complex homeAddress attribute, then by the person's first name.
where : stringAn expression to restrict the set of class instances that the cursor reads.
- Example
The Where expression '(= (@ firstName) "Joe") restricts the cursor to reading only from those classes whose firstName attribute is "Joe".
Parents
g_ETLActivitySteps_ETLPipeline - Pipelines gather and group cursors and commands together into related units, becoming the defining blocks of your ETL activities.
Parent topic: g_ETLActivitySteps_ETLPipeline