Skip to content

FeatureLayer.query returning dict instead of FeatureSet #2450

@NoahLittle2001

Description

@NoahLittle2001

Describe the bug
When using the FeatureLayer.query method and requesting a large number of attributes and features the method will return a dictionary instead of a FeatureSet. This dictionary includes the error 'exceededTransferLimit': True. This error will pop up even if you request less than the maxRecordCount if requesting many attributes.

To Reproduce
Steps to reproduce the behavior:

gis = GIS('pro')
fl = FeatureLayer(url, gis=gis)
fetch_size = getattr(fl.properties, "maxRecordCount")
fs = fl.query(where='1=1', out_fields=['*'], return_geometry=True, result_record_count=fetch_size)
print(fs)
print(type(fs))

error:

'geometry': {'x': 2953720.9347767606, 'y': 14609546.783672191}},
  ...],
 'exceededTransferLimit': True}

dict

Screenshots

Image Image

Expected behavior
The Arcgis Python API should handle this internally and change the request size or limit. Keeping the return type as a FeatureSet exclusively would make things more predictable.

Platform (please complete the following information):

  • Windows 11
  • Chrome
  • 2.4.1.1

Additional context
While this might not be a bug I feel that this error is not handles properly and should be handed internally with the python API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cannot reproducecannot reproduce the error/bug/issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions