Esri/arcgis-python-api

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

Closed this issue · 5 comments

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):

  • OS: Linux, WSL 2
  • Browser: Chrome
  • Python API Version: 2.3.0.1

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

@dnsohrabian Thanks for reporting we will take a look!

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?

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

@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!

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