first 1000 records

3546
5
11-06-2014 10:06 AM
CindyEhrenclou
New Contributor

Hello,

how do I get all the records in a service layer to show up in the table or export to shapefile. Right now I'm only getting the first 1,000 and there are 3,080 records.

thank you!

0 Kudos
5 Replies
XanderBakker
Esri Esteemed Contributor

Normally services are configured by default to return only the first 1000 records. You can change the configuration of the service to return more features or if you don't have access to this configuration you can use for instance the REST interface to query records based on for instance the ObjectID:

objectid > the highest objectid from the previous query.

The query below queries the features starting from a certain objectid:

Query Features (Earthquakes from last 7 days - Earthquakes/EarthquakesFromLastSevenDays)

Using some Python code you can translate the url query to a featureclass:

import arcpy

fcout = r'path to your output featureclass'

url = 'http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/EarthquakesFromLastSevenDays/...'

fs = arcpy.FeatureSet()

fs.load(url)

arcpy.CopyFeatures_management(fs, fcout)

You should start with querying the entire service, store the result as featureclass, determine the highest objectid, and use that objectid in the next query. At the end merge the featureclasses...

Kind regards, Xander

0 Kudos
JustinCornell
New Contributor III

I'm trying to use the a url that is an ArcGISDynamicMapServiceLayer and not a FeatureService.  Is it possible to create a FeatureSet from that type of url?  I've tried but I get this error "RecordSetObject: Cannot open table for Load".  If so, would you be able to provide an example?   Or perhaps you have another suggestion on how to use that type of service as a parameter to be used in a Geoprocessing Task on ArcGIS Server?

My layer url looks like this:  https://localhost:6443/arcgis/rest/services/TEST_SERVICES/JKC/MapServer/1 

Thanks!

Justin

0 Kudos
by Anonymous User
Not applicable

You can change the Max Record count in the REST endpoint following this workflow:

How to update the Max Record Count of a Feature Service in REST

Thanks!

XanderBakker
Esri Esteemed Contributor

This is a very good suggestion (+1 for that), if you are the "owner" of the data and have administrative right on the service...

Kind regards, Xander

0 Kudos
TimMarquardt1
New Contributor III

Depending on your workflow and needs, you can also set this parameter when publishing the feature service.  You must have Feature Access enabled to adjust this number.

0 Kudos