Esri / arcgis-python-api

Documentation and samples for ArcGIS API for Python
https://developers.arcgis.com/python/
Apache License 2.0
1.89k stars 1.1k forks source link

Feature Layer query() using return_all_records does not return all records #1823

Closed dnsohrabian closed 5 months ago

dnsohrabian commented 5 months ago

Describe the bug When using the .query() method on a Feature Layer, it returns the max record count (1000 in my case) even if you pass return_all_records=True to the method. It should be returning all records.

To Reproduce Steps to reproduce the behavior:

# Living Atlas USA 2020 Census Population Characteristics
census_ago_id = 'ebeb65deb5c14f4d8849fd68944b7ee6'
census_item = gis.content.get(census_ago_id)
blockgroup_census = census_item.layers[4] # The fourth feature layer is block groups
blockgroup_fs = blockgroup_census.query(where="County = 'Cuyahoga County'", return_all_records=True)

error: blockgroup_fs FeatureSet only has 1,000 records, which is not the full set according to where clause.

Screenshots If applicable, add screenshots to help explain your problem.

Expected behavior The query returns everything the where clause specifies, no matter how many records. It should return 1,184 features in the query.

Platform (please complete the following information):

Additional context This only started happening after updating to 2.3.0.1. Using 2.2 does not cauase this bug.

nanaeaubry commented 5 months ago

@dnsohrabian Thanks for reporting we will take a look!

dnsohrabian commented 5 months ago

Thank you for looking at this one. @achapkowski Can you please offer any details for why this was closed? Is this something that's already fixed? Was it not reproducible?

dnsohrabian commented 5 months ago

Hi @nanaeaubry, can you clarify if this wasn't reproducible or if something is wrong with my submission?

nanaeaubry commented 5 months ago

@dnsohrabian We were able to reproduce and it has been fixed for the next release.

From above you can see an issue was opened on our side and a PR was made and merged in for the next version: image

Hope that helps!

dnsohrabian commented 5 months ago

@nanaeaubry Thank you, that's great to hear. Appreciate the update! Will look forward to next release.