Hi there,
I have a hosted Feature Layer on AGOL with 3 layers.
When I run following code:
gis = GIS("portal", "user", "password")
feature_layer_item = gis.content.get("layer item id")
for layer_id in [0, 1, 2]:
layer = feature_layer_item.layers[layer_id]
result = layer.delete_features(where="1=1")
logging.info("Delete Result: {}".format(result))
# note: code snippet simplified for question
The data is deleted for 2 layers but not the third one, even though it's the same code and a simple where clause.
I get following error which does not help at all:
Delete Result: {'deleteResults': [{'objectId': 1, 'uniqueId': 1, 'globalId': None, 'success': False, 'error': {'code': 1000, 'description': "Incorrect syntax near ')'."}}]}
Incorrect syntax near ')'
I do not see an error in the where clause 1=1 and it works for the other layers.
There must be something I miss or could this be a bug?