Hello - I need to automate a nightly update from one item in a File Geodatabase to overwrite a feature layer in ArcGIS Enterprise Portal. I am using the code from this site almost exactly
I can connect to the my portal site, and something runs and the feature layer even gives an updated modified date, but I don't think its finding my File GeoDatabase correctly.
This is the code I'm using (note that identifying info has been changed)
import os
import arcgis
from arcgis.gis import GIS
from arcgis.features import FeatureLayerCollection
orgURL = "https://my.website.com"
adminUserName = "administratoraccount"
orgPass = "password"
gis = GIS(orgURL, username=adminUserName, password=orgPass)
LOCgdb = "C:\PLSS_HARN.gdb"
LOCAL_Parcel = "Parcel_Tax"
Parcel_Online = gis.content.search("id:12233456678889911000")
FLC_Parcel_Online = FeatureLayerCollection.fromitem(Parcel_Online[0])
FLC_Parcel_Online.manager.publish.overwrite(os.path.join(LOCgdb, LOCAL_Parcel))
I can update the feature layer manually in Pro by overwriting the web layer just fine.
What am I missing?