How can I use the Python API to edit the attribute table of an existing hosted dynamic image collection so I can set a date?
Using ArcGIS Pro, I manually created a mosaic dataset with time enabled and published as a hosted dynamic image collection to ArcGIS Online.
Now, using ArcGIS API for Python, I want to automate adding new images to the collection with dates. However, I cannot see anywhere that lets you set the date attribute.
I used these Dev Summit examples to add images to the collection:
https://www.arcgis.com/home/item.html?id=bd10a9f25d6c4dfab0db38cffda0901b
https://www.arcgis.com/home/item.html?id=306f5e24e56c4766858ecfab37206455
and tried:
sdf = fs.layers[0].query().sdf
sdf.loc[index, 'acquisitionDate'] = pd.to_datetime('2025-01-01 00:00:00', format='ISO8601').to_datetime64()
fs.layers[0].edit_features(updates=[sdf])
but it returns the error
AttributeError: 'ImageryLayer' object has no attribute 'edit_features'
Thanks in advance 🙂