Skip to main content
Question

Running a workspace from cmd.exe

  • April 2, 2017
  • 3 replies
  • 65 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)
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • 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


  • Author
  • 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

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

 

 


verdoodtdries
Supporter
Forum|alt.badge.img+23

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 !