The following procedure demonstrates how to use the General Aggregation Report plugin to run the following statistical metrics aggregations on records in your Predix Studio Index: Minimum, Maximum, Average, Sum, Statistics, Extended Statistics, and Value Count.
When applied on the sample data set, it will show statistical information* about the passing vehicle volume of certain streets in Chicago.
*minimum maximum, average, sum, statistics, extended statistics, or value count, depending on how you configure your aggregation
Ingest data into DMW following these instructions and using this sample data set. Name your model com.ged_chicagotraffic
and your package ChicagoTraffic
.
Use the Director Service Debugger with the General Aggregations Plugin.
.
1) Navigate to director service debugger.
2) Open GeneralAggregations.xml.
3) Select POST as the query type.
For step 4, proceed to the type of aggregation you are using.
4) Input the following query into the Content field, making sure to adjust the value in Index
to reflect your index name.
<Index>com.ged_chicagotraffic</Index>
<Type>ChicagoTraffic</Type>
<AggNode name="Passing Vehicles" type="min">
<Field>chicagoTraffic_totalPassingVehicleVolume</Field>
</AggNode>
In the Result field, you should see something that looks like this.
<Report>
<Aggregation name="Passing Vehicles">
<Entry key="min">700.0</Entry>
</Aggregation>
</Report>
4) Input the following query into the Content field, making sure to adjust the value in Index
to reflect your index name.
<Index>com.ged_chicagotraffic</Index>
<Type>ChicagoTraffic</Type>
<AggNode name="Passing Vehicles" type="max">
<Field>chicagoTraffic_totalPassingVehicleVolume</Field>
</AggNode>
In the Result field, you should see something that looks like this.
<Report>
<Aggregation name="Passing Vehicles">
<Entry key="max">165200.0</Entry>
</Aggregation>
</Report>
4) Input the following query into the Content field, making sure to adjust the value in Index
to reflect your index name.
<Index>com.ged_chicagotraffic</Index>
<Type>ChicagoTraffic</Type>
<AggNode name="Passing Vehicles" type="avg">
<Field>chicagoTraffic_totalPassingVehicleVolume</Field>
</AggNode>
In the Result field, you should see something that looks like this.
<Report>
<Aggregation name="Passing Vehicles">
<Entry key="avg">19466.301798279907</Entry>
</Aggregation>
</Report>
4) Input the following query into the Content field, making sure to adjust the value in Index
to reflect your index name.
<Index>com.ged_chicagotraffic</Index>
<Type>ChicagoTraffic</Type>
<AggNode name="Passing Vehicles" type="sum">
<Field>chicagoTraffic_totalPassingVehicleVolume</Field>
</AggNode>
In the Result field, you should see something that looks like this.
<Report>
<Aggregation name="Passing Vehicles">
<Entry key="sum">2.48974E7</Entry>
</Aggregation>
</Report>
4) Input the following query into the Content field, making sure to adjust the value in Index
to reflect your index name.
<Index>com.ged_chicagotraffic</Index>
<Type>ChicagoTraffic</Type>
<AggNode name="Passing Vehicles" type="stats">
<Field>chicagoTraffic_totalPassingVehicleVolume</Field>
</AggNode>
In the Result field, you should see something that looks like this.
<Report>
<Aggregation name="Passing Vehicles">
<Entry key="avg">19466.301798279907</Entry>
<Entry key="min">700.0</Entry>
<Entry key="max">165200.0</Entry>
<Entry key="count">1279</Entry>
<Entry key="sum">2.48974E7</Entry>
</Aggregation>
</Report>
4) Input the following query into the Content field, making sure to adjust the value in Index
to reflect your index name.
<Index>com.ged_chicagotraffic</Index>
<Type>ChicagoTraffic</Type>
<AggNode name="Passing Vehicles" type="extended_stats">
<Field>chicagoTraffic_totalPassingVehicleVolume</Field>
</AggNode>
In the Result field, you should see something that looks like this.
<Report>
<Aggregation name="Passing Vehicles">
<Entry key="sumOfSquares">6.827019E11</Entry>
<Entry key="stdDeviation">12443.511065484301</Entry>
<Entry key="avg">19466.301798279907</Entry>
<Entry key="min">700.0</Entry>
<Entry key="max">165200.0</Entry>
<Entry key="variance">1.5484096763683024E8</Entry>
<Entry key="count">1279</Entry>
<Entry key="sum">2.48974E7</Entry>
</Aggregation>
</Report>
4) Input the following query into the Content field, making sure to adjust the value in Index
to reflect your index name.
<Index>com.ged_chicagotraffic</Index>
<Type>ChicagoTraffic</Type>
<AggNode name="Passing Vehicles" type="value_count">
<Field>chicagoTraffic_totalPassingVehicleVolume</Field>
</AggNode>
In the Result field, you should see something that looks like this.
<Report>
<Aggregation name="Passing Vehicles">
<Entry key="value">1279</Entry>
</Aggregation>
</Report>
How to Use the Date Histogram Aggregation With Director Service Debugger (Beta 10.4)
How to Use the Range Aggregation With Director Service Debugger (Beta 10.4)
How to Use the IP Range Aggregation With Director Service Debugger (Beta 10.4)
How to Use the Date Range Aggregation With Director Service Debugger (Beta 10.4)
How to Use GeoHash Grid Aggregation With Director Service Debugger (Beta 10.4)
How to Use Significant Terms Aggregation With Director Service Debugger (Beta 10.4)
How to Use Geo Distance Aggregation With Director Service Debugger (Beta 10.4)
How to Use Cardinality Aggregation With Director Service Debugger (Beta 10.4)
How to Use Percentiles Aggregation With Director Service Debugger (Beta 10.4)
How to Use Terms Aggregation With Director Service Debugger (Beta 10.4)