Skip to main content

What information can a shutdown script access? Can I see where the data was written?

In python, a shutdown script has a variable named FME_MacroValues that contains a dictionary. 

As an example, this is the contents of the dictionary in a very simple workspace I created that has only a Creator transformer and a Text File writer:

{  
   'FME_PRODUCT_NAME_ENCODED':'FME<openparen>R<closeparen><space>2017.0.0.0',
   'FME_MF_DIR_MASTER_USERTYPED_ENCODED':'<solidus>private<solidus>tmp<solidus>',
   'FME_MF_DIR_UNIX_MASTER':'/private/tmp',
   'FME_MF_NAME_MASTER_ENCODED':'wb-xlate-1472590347470_83600',
   'FME_HOME_ENCODED':'<solidus>Library<solidus>FME<solidus>2017.0<solidus>',
   'FME_MF_NAME_MASTER':'wb-xlate-1472590347470_83600',
   'DestDataset':'',
   'FME_SHAREDRESOURCE_DATA':'',
   'TEXTLINE_OUT_OVERWRITE_FILE_TEXTLINE_1':'YES',
   'FME_HOME':'/Library/FME/2017.0/',
   'FME_BUILD_DATE':'20160823',
   'FME_MF_DIR_ENCODED':'<solidus>private<solidus>tmp<solidus>',
   'FME_SHAREDRESOURCE_TEMP':'',
   'Creator_XML':'*',
   'FME_SECURITY_USER':'',
   'FME_TOPIC':'',
   'FME_PRODUCT_NAME':'FME(R) 2017.0.0.0',
   'TEXTLINE_OUT_DESTINATION_DATASETTYPE_VALIDATION_TEXTLINE_1':'Yes',
   'FME_MF_DIR_USERTYPED':'/private/tmp/',
   'FME_DATA_REPOSITORY':'',
   'WB_CURRENT_CONTEXT':'',
   'FME_MF_DIR_MASTER':'/private/tmp/',
   'FME_SERVER_REQUEST_METHOD':'',
   'FME_MF_NAME':'wb-xlate-1472590347470_83600',
   'FME_MF_DIR_UNIX':'/private/tmp',
   'FME_CF_DIR':'/private/tmp/',
   'FME_MF_DIR_DOS':'\\private\\tmp',
   'FME_SERVER_REQUEST_HEADERS':'',
   'Creator_CLASSIC':'NOT_ACTIVATED',
   'FME_MF_DIR_UNIX_ENCODED':'<solidus>private<solidus>tmp',
   'FME_TOPIC_MESSAGE':'',
   'TEXTLINE_OUT_WRITE_LAST_EOL_TEXTLINE_1':'YES',
   'FME_MF_DIR_MASTER_ENCODED':'<solidus>private<solidus>tmp<solidus>',
   'FME_MF_DIR_DOS_MASTER':'\\private\\tmp',
   'FME_BASE':'no',
   'FME_MF_DIR_DOS_ENCODED':'<backslash>private<backslash>tmp',
   'TEXTLINE_OUT_ENCODING_TEXTLINE_1':'SYSTEM',
   'FME_MF_DIR_USERTYPED_ENCODED':'<solidus>private<solidus>tmp<solidus>',
   'FME_MF_NAME_ENCODED':'wb-xlate-1472590347470_83600',
   'WB_KEYWORD':'"TEXTLINE_1"',
   'FME_HOME_DOS':'\\Library\\FME\\2017.0',
   'DestDataset_TEXTLINE_1':'/Users/aaronkoning/Desktop/output.txt',
   'FME_CF_DIR_MASTER_ENCODED':'<solidus>private<solidus>tmp<solidus>',
   'FME_HOME_UNIX':'/Library/FME/2017.0',
   'Creator_2D3D':'2D_GEOMETRY',
   'FME_BUILD_NUM':'17134',
   'FME_HOME_DOS_ENCODED':'<backslash>Library<backslash>FME<backslash>2017.0',
   'FME_ENGINE':'',
   'FME_SERVER_HOST':'',
   'FME_SECURITY_ROLES':'',
   'FME_MF_DIR_UNIX_MASTER_ENCODED':'<solidus>private<solidus>tmp',
   'FME_MF_DIR_DOS_MASTER_ENCODED':'<backslash>private<backslash>tmp',
   'WORKSPACE_NAME':'wb-xlate-1472590347470_83600',
   'FME_DESKTOP':'no',
   'FME_HOME_USERTYPED':'/Library/FME/2017.0/',
   'FME_HOME_UNIX_ENCODED':'<solidus>Library<solidus>FME<solidus>2017.0',
   'FME_MF_DIR':'/private/tmp/',
   'FME_CF_DIR_MASTER':'/private/tmp/',
   'FME_BUILD_DATE_ENCODED':'20160823',
   'FME_MF_DIR_MASTER_USERTYPED':'/private/tmp/',
   'DATASET_KEYWORD_TEXTLINE_1':'TEXTLINE_1',
   'FME_SERVER_WEB_URL':'',
   'TEXTLINE_OUT_END_OF_LINE_TEXTLINE_1':'System',
   'FME_SERVER_REQUEST_URI':'',
   'FME_SERVER_DEST_DIR':'',
   'FME_SERVER_REQUEST_PARAMETERS':'',
   'FME_SERVER_PORT':'',
   'Creator_COORDS':'<Unused>',
   'TEXTLINE_OUT_MIME_TYPE_TEXTLINE_1':'text/plain',
   'FME_CF_DIR_ENCODED':'<solidus>private<solidus>tmp<solidus>',
   'FME_VIEWER_APP':'fmedatainspector',
   'TEXTLINE_OUT_WRITE_UTF8_BOM_TEXTLINE_1':'YES',
   'FME_BUILD_NUM_ENCODED':'17134',
   'FME_JOB_ID':'',
   'FME_HOME_USERTYPED_ENCODED':'<solidus>Library<solidus>FME<solidus>2017.0<solidus>'
}

 

You can see that the path of my Text File writer is provided by DestDataset_TEXTLINE_1 in the dictionary.

The following shutdown python script will give that value to a variable and then print it.

writerPath = FME_MacroValuesp'DestDataset_TEXTLINE_1']
print writerPath

You can also refer to this page for other informations related to the cpu time and number of feature read/written as an example:

FME_END_PYTHON


Reply