According to the documentation, there is a paramater (context) in the tool arcgis.features.analysis.join_features. In this parameter, there is an option to overwrite an existing feature layer.
It is a dictionary, and I am writing it like that. However, I still get an error, saying the name already exist. Which I thought would be solved by enabling the overwrite.
Am I writing it wrong? or is there a mistake in my code?
*Update:
So, I realized that maybe I needed to call the layer to be overwritten per se. which I just did at the beggining of the code.
And it finally works! The error does not appear anymore.
HOWEVER, when reviewing the feature layer I notice that it is adding more layers instead of overwriting the existing layer.
This service is going to be updated regularly, so I don´t want to accumulate layers.
So, that was the update. Any suggestions or recommendations are more than welcome!
thanks.
Hi, did you find solution? I have the same problem.
Workaround:
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.
Hope this helps!