Hi all,
I have the below code written in AGOL notebook and its purpose is to join features of two feature layers. The output layer will need to be overwritten regularly through running the code every day and the layer also needs to be maintained because it will be used to build a dashboard. I used the Tasks functionality to run the code everyday, but I always get the below error, despite having the Overwrite parameter in my join_features function. Any idea how I can achieve that?
---------------
The error:
"The provided output name is already in use or contains invalid characters."
--------------
The code:
from arcgis.gis import GIS
gis = GIS("home")
itemDis = gis.content.get("8119.............14")
itemDis
itemSrv = gis.content.get("2056ad................fa73")
itemSrv
from arcgis import features
intersectionLayer= features.summarize_data.join_features(target_layer=itemDis,
join_layer=itemSrv,
spatial_relationship='intersects',
output_name='intersection features',
context = {"overwrite": True})
intersectionLayer
Hi @SeanKMcGinnis, I've seen your contributions to relevant questions and wondered if you could help me with that please? Or could you guide me to the right direction/person?
hello, i have the same problem. did you find a solution?
Hi, unfortunately not. I believe the overwrite parameter has been deprecated in the new API version. That's why it's not functioning as expected. Any luck with you?
I'm having the same issue, did you ever find a workaround?
Hi @AhmedShehata3 @EmilyMills11 @JiříKomínek,
In order to use "overwrite": True in the context parameter, the output_name must be a feature layer, not a text string.
Here's a sample code:
Use ArcGIS Online Assistant to remove sublayers from feature layer. NOTE: ArcGIS Online Assistant is not supported by Esri Technical Support.
1. Navigate to assistant.esri-ps.com and Log In.
2. Under "My Content", find the target feature layer and click it. Click "View Item JSON".
3. Click on the "Data Tab". Click "Edit JSON".
4. Delete the duplicate json data. Be sure to keep the original ("id": 0). Deleting it all will break the layer and any dependent apps.