I am trying to modify an FME custom transformer to run the ESRI ArcPy clip_analysis function and I'm not sure how to write the script to read the two input datasets needed for the clip_analysis. Here is a link to the custom transformer I am modifying. using-arcpy-for-fme-feature-processing
I have each of the datasets going into the PythonCaller and the fme_feature_type attribute is added and populated when they input into the custom transformer.
import fme
import fmeobjects
import arcpy
def processFeature(feature):
# Get clipper and clippee FC's and settings from feature attributes
dataset = feature.getAttribute("pre_clipped")
arcpy.env.workspace = dataset
# Set local variables
inFeatures = "pre_clipped"
clipFeatures = feature.getAttribute("clipper")
outFeatureClass = dataset + "/clipped"
# Execute Clip using clipper and clippee
arcpy.Clip_analysis(inFeatures, clipFeatures, outFeatureClass)