Skip to main content

Hi there,

I'm using FME Desktop & Server 2016.1 with Esri ArcDesktop 10.3.1. The workbench is reading oracle spatial data and writing it into Esri File geodatabases.

In the Shutdown Python Script, I would like to find all the objects in the workbench to determine which are Feature Types, get there Feature Class/Table name and associated writer's destination path & file name.

Once I have this information, I can use Esri's arcpy module (I have already worked out how to import this) to create indexes, etc. on the feature classes.

Thanks

You can use the special FME shutdown script variables contained in the "fme" module to find the name of every feature class written, see the help: https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Workbench/Configuration/FME_END_PYTHON.htm

Example shutdown script:

import fme
for fc_name, fc_count in sorted(fme.featuresWritten.items()):
    print 'Feature type name:', fc_name,
    print 'Number of features written:', fc_count

Unfortunately the feature type attributes and the writer paths aren't accessible that way.


Reply