We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

Agg Ex (Lavastorm) vs Aggregate (D360)

Comments

5 comments

  • Avatar
    Adrian Williams

    Here is an example using the default data in a Create Data node that aggregates data grouped by the 'type' field's value.

    You can initially use the grid editor to generate the individual aggregate values:

    Which generates the following output:

    Then you need to switch to the Advanced tab of the 'Operations' property. The metadata for the additional fields you want to output are configured in the ConfigureFields script (in the example the 'color' field is being output).

    To create a new calculated field you need to define the metadata in the ConfigureFields script (here the 'Total' field being defined as a Python float type - which equates to a double)

    The value for the 'Total' field in this case is the sum of the individual aggregate values

    Which generates the following output data:

     

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    You can find additional information on the Aggregate node in your system Help, this is also available online for the latest version of the product here:

    https://doc.infogixsaas.com/analyze/Default.htm#e-node-help/Aggregation_and_Transformation/aggregate.html 

    Additional detail on the grouping functions used by the Aggregate node can also be found here:

    https://doc.infogixsaas.com/analyze/Default.htm#f-script/python/python-modules.htm 

    0
    Comment actions Permalink
  • Avatar
    Geoff

    ohhh you have to sum the OUTPUTS, i tried everything BUT that. lol

    thanks again!!

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    Because the grid editor was used to define the aggregates it generates the simpler to use constructor where the aggregate object is defined within the ConfigureFields script. Because of this much of the inner-workings of the aggregate functions are implicitly handled by the node meaning the only way to access the 'final' value of the aggregate at 'group end' is using the value assigned to the field in the output record.

     

    The aggregate functions also have an Advanced mode of use where the aggregate object is defined in the ProcessRecords script.  In this case the metadata for the output fields that will hold the final aggregate values are defined in the ConfigureFields script. When the first record is being processed by the ProcessRecord script the aggregate objects are defined. Then the aggregate objects are explicitly updated with the current values for each record. As the 'ImplicitWriteEvaluation' property is set to 'Group End' (the default) the output values are only written by the node at the end of each group.

    See the 'Advanced Use of Grouping functions' in the Help for further details

    https://d3sa-preview.infogixsaas.com/docs/dist/help/Content/f-script/python/python-modules.htm#Advanced 

    The example data flow is attached below.

     

    Attached files

    Aggregate_Node_Output_Additional_Fields - 24 Sept 2020.lna

     

    0
    Comment actions Permalink
  • Avatar
    Geoff

    ok that makes sense. Thanks Adrian!

    0
    Comment actions Permalink

Please sign in to leave a comment.