Hello everyone,
I am trying to download a feature layer from my AGO enterprise account as a shapefile or CSV. I have the following code:
item_id = select_item.id
agolItem = gis.content.get(item_id)
outputGDB = extract_data([agolItem], data_format='Shapefile')
this code gives me the following error:
{"messageCode": "AO_100026", "message": "ExtractData failed."} Failed to execute (ExtractData). Failed. I read a few other post just like mine but I couldn't figure out why I keep getting an error. Thank you
Solved! Go to Solution.
The following code works for me, and my environment is Python API version 1.5.0
from arcgis.gis import GIS
from arcgis import extract_data
gis=GIS(profile="agol_simoprofile")
# test_item is a feature service item
test_item=gis.content.get("<my item id>")
result=extract_data(test_item.layers,output_name="test_extract_data"
,data_format="SHAPEFILE")
result
The following code works for me, and my environment is Python API version 1.5.0
from arcgis.gis import GIS
from arcgis import extract_data
gis=GIS(profile="agol_simoprofile")
# test_item is a feature service item
test_item=gis.content.get("<my item id>")
result=extract_data(test_item.layers,output_name="test_extract_data"
,data_format="SHAPEFILE")
result
hi @simoxu
exports_data() exports data in AGO not on local disk. Do you know any way that I can download the secured feature layer directly to the disk?
Simo,
I tried the code you provided me and it works perfectly.
Thank you so much!
Not problem