Question

Running a workspace from cmd.exe

  • 2 April 2017
  • 3 replies
  • 23 views

I'm trying to run a workspace from the command line and I get an error that the metadata template cannot be read, I am not an FME user and I am coding this for another department in our company. Any help is much appreciated.

import os

gdbW=r"C:\Users\YouDoWellItDoesGood\Desktop\1701051\DB_TGS_8171_AF2113452_30_C00_00_20170210.gdb"
qcWorkspace=r"C:\Transglobal\larry_d_gester_qc_basic.fmwt"


def fnRunFromCmd(gdbW,qcWorkspace):

    os.system("start cmd /c fme.exe C:\Transglobal\larry_d_gester_qc_basic.fmwt --gdbPath C:\Users\YouDoWellItDoesGood\Desktop\1701051\DB_TGS_8171_AF2113452_30_C00_00_20170210.gdb")

fnRunFromCmd(gdbW,qcWorkspace)

3 replies

Userlevel 2
Badge +17

Hi @garydlester, the extension .fmwt usually indicates that the file is a template which is a compressed file containing a workspace and 0+ related file(s). A template cannot be run directly, but the workspace within it can be extracted automatically when you open the template with FME Workbench.

Modify the workspace if necessary and save it as a *.fmw (workspace file) or a *.fme (mapping file). You can then run the workspace from a command line.

See also here to learn more about Template: About Templates

Hi @garydlester, the extension .fmwt usually indicates that the file is a template which is a compressed file containing a workspace and 0+ related file(s). A template cannot be run directly, but the workspace within it can be extracted automatically when you open the template with FME Workbench.

Modify the workspace if necessary and save it as a *.fmw (workspace file) or a *.fme (mapping file). You can then run the workspace from a command line.

See also here to learn more about Template: About Templates

Super Awesome, thanks. I will have the file modified and try running again.

 

 

Badge +3

Hello garydlester,

When you launch a workspace, the first lines of the logfile state:

You can copy these lines, save them in a batch-file and run this batch file.

As you can see in my example, you can pass parameters to the workspace by creating published parameter (Input_file).

If you need more help, please ask. Good luck !

Reply