Data Field Default Aggregations
    • Dark
      Light

    Data Field Default Aggregations

    • Dark
      Light

    Article Summary

    When working in applications such as Data Visualization, we often aggregate underlying records across a time period into bins. 

    Example: for fields like gross weight, users often need the total, not the average. The wrong aggregation function can lead to mistrust in the data or the need to manually adjust the function each time.


    To avoid this, it's possible to set the default aggregation function for each field in Factory Build. 

    Setting the Default Aggregation Function

    Step 1: Navigate to Factory Build.


    Step 2: Select the development workspace where the default aggregations can be modified.



    There are two ways to set the default aggregation function. 

    1. Implicit Method: This method involves the last aggregation function for a given data field and is done implicitly.
    2. Explicit Method: This method explicitly defines each field's aggregation function, and uses the 'annotate by field' operator.

    Implicit Method: Annotate by Field Operator

    The first method involves the last aggregation function for a given data field and is done implicitly.




    The default data visualization aggregation function is automatically determined based on the aggregate function for each field.



    For instance, using the function 'sum' for the gross weight field will default the aggregation function to 'total'.



    Explicit Method: Annotate by Field Operator

    Alternatively, to explicitly define each field's aggregation function, use the 'annotate by field' operator.


    For each field, such as gross weight, add the annotation type of 'default-aggregation' and set the value based on whatever default is required.




    Additional documentation is available in the 'annotate by field' section, accessible via the info icon.

    In summary, automated aggregations set the default aggregation function, while the 'annotate by field' operator allows for explicit setting of the aggregation function per field.