- I have a Hosted Feature service that I own and also have the Extract capability enabled.
- Contains two layers, of which I want to download the first layer into a file geodatabase
I was hoping to find a sample that uses arcgis.extract_data
This post is similar, but looks like the op ended up using ArcPy.
Have tried a few things:
from arcgis.gis import GIS
from arcgis.features.manage_data import extract_data
gis = GIS("https://mydevplan.maps.arcgis.com/","un","pw")
waze_hfs_item = gis.content.get('5c80a03f09154b2bb845f986dce325cd')
waze_alerts_layer = waze_hfs_item.layers # REST Endpoint for layer returned
# outputGDB = arcgis.extract_data(['Alerts']) # Exception: Job failed.
# outputGDB = arcgis.extract_data(waze_hfs_item) # Exception: Job failed.
outputGDB = arcgis.extract_data(waze_alerts_layer) # TypeError: 'FeatureLayer' object is not iterable
I believe all I really need to supply to extract_data is :
input_layers :Required list of strings
Was wondering if someone could point me to a working sample that leverages extract_data. I am sure this is a simple one.