I'm trying to overwrite a feature layer with a feature class in a local GDB, essentially just trying to script the process that takes two clicks to do within ArcGIS Pro.
I think this is how you construct the overwrite but I can't find how to choose which layer you're overwriting.
variable name that corresponds with feature layer.manager.overwrite('path to local data') Do I have to search for feature layer first using something like this? search_result giscontentsearchquery item_type
flcFeatureLayerCollectionfromitemsearch_result What's difference between Feature Layer and Feature Layer Collection? Instead of searching can I just identify the feature layer by item id? Scott
It is my understanding that a feature layer collection is just a collection of feature layers and tables. You can access a feature layer through the id or using the URL associated with it. The following documentation (Using Feature Layers | ArcGIS for Developers ) does a good job of explaining this workflow.
In regards to overwriting a layer you will need to make sure that the local GDB has the same schema as the layer. Then you would just do the following....
The steps above is explained in the following sample (overwriting_feature_layers | ArcGIS for Developers). The sample is using a CSV but you can easily omit the parts you don't need since you are using a local GDB.