I am trying to run a python script in a PythonCaller to Truncate Features in an Oracle ArcSDE database.
If I run the script and hard code the Feature it runs fine but when I try to use feature.getAttribute to read a list created in a previous transformer, I keep getting:
Python Exception <ExecuteError>: Failed to execute. Parameters are not valid.
ERROR 000187: Only supports Geodatabase tables and feature classes
My script is:
# Import arcpy module
import arcpy
def processFeature(feature):
IFeatures = ('C:\\\\AppData\\\\Roaming\\\\ESRI\\\\Desktop10.5\\\\ArcCatalog\\\\Connection_to_HYDRA.sde\\\\' + feature.getAttribute('_list{0}'))
print (IFeatures)
for mark in IFeatures:
arcpy.TruncateTable_management(mark)