Select to view content in your preferred language

Support Statistics for data that is published from query layer

3855
7
01-25-2013 04:58 AM
Status: Open
VytautasGipiskis
Esri Contributor
ArcGIS REST API allows to perform statistical functions on the Map service layers.  
http://resources.arcgis.com/en/help/rest/apiref/index.html?featureserver.html
Layer resource contains supportsStatistics that indicates if the layer supports statistical functions in query operations and supportsAdvancedQueries to indicate if the layer supports orderBy in a query operation.

Awfully this functionality is limited to layers whose source is Geodatabase. I would like query layers to get this functionality as well. Query layers have huge advantage, when server side joins, computed colums are required.



7 Comments
DamienO_Callaghan1
This is required for using Query Layers via the Operational Dashboard as a number of the widgets require statistics to be enabled on the service.
JackZHANG
Query layer is the one that can provide user flexibily of what tables they want to drive the statistics from. We need Queyr Layer supports statistics.
FrankVeldhuis1
I was having problems with the statistics tool until I came accross this idea. If a query layer is used the service doesn't return an error. This drove me nuts. At least give us a error/warning that stats are not supported on query layers.
FabianoScardua
Query layer is the one that can provide user flexibily of what tables they want to drive the statistics from. We need Queyr Layer supports statistics.
MichaelVolz

Can someone provide a simple example of a statistic call to a geodatabase layer through the REST endpoint?

I ask because it appears that I can use ORDER BY FIELDS in the REST endpoint page and it work on a standard geodatabase layer as well as a query layer.  I can see the usefulness of statistics on a query layer for an Operations Dashboard so I would like to know if ORDER BY FIELDS is considered a statistic as it is working for me on a query layer REST call at 10.5.1.

FabianoScardua

Statistics use a aggregation function 

To test you need use the outStatistics and groupByFieldsForStatistics parameters from REST API

https://services.arcgis.com/A6pvCYPD0FSpq2rw/arcgis/rest/services/Trails/FeatureServer/0/query?where... 

LSaunders

This needs to be added to make the new Operations Dashboard functional!  Live data comes from all sorts of sources, query layers is one common one.  Seems like oversight to me!