Hello, I get a fresh csv every morning that I geocode and publish as a feature layer to be consumed in a dashboard. Now when I use python script to automate the workflow every morning, I see a lock from my ArcGIS Server service account. This lock (probably) doesn't let the python to overwrite the feature and a result, the new feature class that gets created appears in UPPER CASE and as a stand alone layer (not inside feature dataset). From second time around, the script just fails because either it couldn't overwrite the feature class or because it thinks there is already a feature class with that name inside the enterprise geodatabase.
So, basically how can I overwrite a feature class that is published and hence has a lock from service account using python?