Hi, I'm using ArcGIS API for Python for querying a table using the following parameters:
query = maintenance.query(where='1=1', out_fields='structureid,last_maintenace', return_geometry=False, group_by_fields_for_statistics='structureid', out_statistics='[{"statisticType": "max","onStatisticField": "maintanancedate", "outStatisticFieldName": "last_maintenace"}]')
I'm always getting a error when trying to use the out_statistics parameter and there is no documentation for the syntax for this parameters. I'm assuming that it's the same syntax as the REST API where it work.
Help please!
Here is the complete code:
from arcgis import *
gis = GIS("http://...", "user", "password")
item = gis.content.get('123...')
maintenance = item.tables[0]
deployment = item.layers[0]
query = maintenance.query(where='1=1', out_fields='structureid,last_maintenace', return_geometry=False, group_by_fields_for_statistics='structureid', out_statistics='[{"statisticType": "max","onStatisticField": "maintanancedate", "outStatisticFieldName": "last_maintenace"}]')