Select to view content in your preferred language

Problems with Statistics

6530
7
Jump to solution
02-20-2013 11:58 AM
RobChouinard
Frequent Contributor

I have 3 problems with Statistics:

A temporary service you can try this out on: REMOVED

1.) Statistics do not work with a version other than DEFAULT. So If I add a table in as version Office statistics do not work. If I add table in as version DEFAULT statistics do work. See Species_DEFAULT and Species_Office in map service above.

2.) If a versioned table is added to a feature service, it shows it supports statistics in the feature service but not in the map service. It in fact doesn't support then in either. I don't have a public example of this ATM.

3.) Statistics do not work with views. I create a view in the sde (SQL Express) via ArcCatalog and add it to a map service as version DEFAULT. Rest map service shows it supports statistics in both DEFAULT and Office versions but statistics do not work. See vInspectionsMosSites_Office and vInspectionsMosSites_DEFAULT in map service above.

A quick and easy statistic I am trying out:
Where: 1=1

Output Statistics:
[{
"statisticType":"count",
"onStatisticField":"*",
"outStatisticFieldName":"Count"
}]

Is there going to be support for versioned statistics in a future release? It would be a pain to be able to edit data and not see the changes in the statistics.

0 Kudos
1 Solution

Accepted Solutions
TanuHoque
Esri Regular Contributor
Rob,
I'm afraid the link to your map service will not help much.
Please contact Esri Tech Support -- they will probably look at your data etc. to find out where the problem lies.

Thanks.

View solution in original post

0 Kudos
7 Replies
TanuHoque
Esri Regular Contributor
getting statistics from non-default version is supported for 10.2.

in query stats request, do not use "*" as 'onStatisticField', instead provide e.g. OBJECTID.
try to avoid using anything that could potentially be a keyword or function name in the outStatisticFieldName. in you case, try something other than "count". Also, this is an optional property that you don't need to specify.
0 Kudos
RobChouinard
Frequent Contributor
Thanks for these tips. Is there an ETA for 10.2? Also does 10.2 allow statistics on views?
0 Kudos
TanuHoque
Esri Regular Contributor
Views should not be any different than FeatureClasses. It should be working with 10.1 too. Would you mind contact Esri Technical Support with reproducible steps/data? We'll be more than happy to look into the reason it is failing for you.

Thanks.
0 Kudos
RobChouinard
Frequent Contributor
Here is an example of a failed query on a view: http://gis.citrusmosquito.org/arcgis_public/rest/services/Stats_Test/MapServer/4/query?where=1%3D1&t...

The layer vInspectionsMosSites_DEFAULT shows it supports both Advanced Queries and Statistics.
0 Kudos
TanuHoque
Esri Regular Contributor
Rob,
I'm afraid the link to your map service will not help much.
Please contact Esri Tech Support -- they will probably look at your data etc. to find out where the problem lies.

Thanks.
0 Kudos
JakeMatthys
Frequent Contributor
I have also found that the OutputStatistics in ArcGIS Server 10.11 will not work with map service layers that are created from feature classes that are in SDO geometry.  Will OutputStatistics work with SDO geometry in the future?
Thanks,
- Jake
0 Kudos
TanuHoque
Esri Regular Contributor
Jake,
I'm not sure why it is not working for you. I'd appreciate if you could contact Esri Tech Support and have them take a look at this.

Thanks.
0 Kudos