Skip to main content
Question

Running a workspace from cmd.exe


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

takashi
Influencer
  • April 2, 2017

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


takashi wrote:

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.

 

 


verdoodtdries
Supporter
Forum|alt.badge.img+18

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 !


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings