steps Properties for Compact Form and SAQL Form

The properties and JSON syntax in the query node of an aggregateflex step type vary based on whether the step is in compact form or SAQL form.

These examples display the aggregateflexstep type in compact form and in SAQL form. For an explanation of the aggregateflex step type and its properties, see aggregateflex Step Type Properties

When the step is in SAQL form, notice how each group and measure are defined in the groups and measures properties, respectively, and also in the pigql property. Other parts of the query—like filters, limits, and order—only need to be defined one time in the pigql property. You specify the compact form elements of "groups" and "measures" so that the associated chart widget can render the correct projections.

In the following sample step, notice that the 'sum_Amount' and 'sum_quantity' projections in the pigql property are referenced in "measures" as [[ "count", "*", "sum_Amount" ], [ "count", "*", "sum_quantity" ]]. Measure projections in the pigql property always include the aggregation, underscore (_), and the name of the measure ('sum_Amount') so that they can be referenced in the compact form.