Select to view content in your preferred language

Python hosted notebooks on runtime 3.11 and 3.12 returns duplicated records using layer query method

160
0
3 weeks ago
Labels (2)
jtmouw_NCDOT
Regular Contributor

Recently I was made to update a hosted notebook (which checked for duplicated Ids) in ArcGIS Online from 3.9 and now the feature layer query method does not function correctly, returning duplicated records and missing other records.

featSet = layer.query(where="AssetId IS NOT NULL", out_fields=['AssetId'], return_geometry=False)

  If i do a quick check with pandas it is returning duplicated OBJECTIDs:

indupeFset.sdf.OBJECTID.value_counts()

Out[25]: 
OBJECTID
343224    2
338906    2
333839    2
333840    2
333841    2
         ..
3493      1
3494      1
3495      1
3496      1
367214    1

 

I have replicated this on both runtimes 3.11 and 3.12 (advanced). it seems similar to this:

https://support.esri.com/en-us/bug/in-arcgis-api-for-python-23-and-24-a-query-on-a-referen-bug-00017...

and the behavior described here:

https://community.esri.com/t5/arcgis-api-for-python-questions/duplicate-records-returned-by-python-a...

but it is happening in a hosted notebook, and not in an oracle map service.

0 Kudos
0 Replies