I have a simple script that I want to use to export multiple hosted feature layers at once. This is my code:
import arcpy
fcList = arcpy.GetParameterAsText(0) #input hosted feature layers
out_workspace = arcpy.GetParameterAsText(1) #output geodatabase
p_info = arcpy.GetParameterAsText(2) #project name text to append onto input layer name
arcpy.overwriteOutput = True
proj = arcpy.mp.ArcGISProject('CURRENT') #set project
#export all the feature services to a geodatabase
for fc in fcList:
outputFeatures = fc + '_' + p_info
arcpy.conversion.FeatureClassToFeatureClass(fcList, out_workspace, outputFeatures)
I am getting these errors:
ERROR 000732: Input Features: Dataset 'Data Point';'Ground Control Point layer' does not exist or is not supported ERROR 000354: The name contains invalid characters Failed to execute (FeatureClassToFeatureClass).
I know that feature layers are supported in ArcGIS Pro 2.8 since I can use them as inputs for the Feature Class to Feature Class tool. I have a Basic License, when I export feature layers to gdb using the regular tool, I get the Message Warning #001102, You must have at least the Standard License to run this tool with the specified data. The data exports fine though, so I tend to ignore this message. None of the feature layers have attachments.
To fix this script, do I need to specify the workspace?
I have a parameter for the input features (fcList), which is a multivalue. I do not have an "in" workspace parameter. I only have the output gdb as a workspace parameter.
Is my issue related to the fact that I am working with feature layers, or I have not set the workspace?