AnsweredAssumed Answered

ArcGIs API for Python - Export Item Parameters

Question asked by gthistle_RMOW on Feb 27, 2019
Latest reply on Jul 23, 2020 by whitney



I am trying to export a layer into a CSV file from a quertied ArcGIs Online layer, and then delete those same features afterwards. My code is as follows:


import arcgis
from arcgis.gis import GIS
gis = GIS("", "User", "Password")
from arcgis.gis import *
import os
icy_conditions = gis.content.get('7b812b022e00426b8f5c14448aa55b73')
icy_layers = icy_conditions.layers
icy_reports = icy_layers[0]
output_file = icy_conditions.export(title=icy_reports,export_format="CSV",parameters=icy_reports.query(where="Status='3'"))'filepath')


I know the delete features works at the end, but I am having trouble getting the query in the parameters section of the export item function (show in cold). There is documentation on how to do this using the JavaScript API, but no example on how to do this in python. I've done a lot of guessing and checking and cannot get the syntax right. Could anyone please offer some help?