Skip to main content

Run Workflows via Command Line

You can run workflows via the command line with AlteryxEngineCmd.exe, located in the Alteryx program files root directory. You must have an Engine API license to use AlteryxEngineCmd.exe.

Example

Run the analytic app contained in the Workflow > Path tag of AppValues.xml.

AlteryxEngineCmd.exe MyWorkflow.yxmd

AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml

AlteryxEngineCmd.exe AppValues.xml

Example return values:

  • 0: Success

  • 1: Warnings Exist

  • 2: Errors Exist

To run workflows via the command line, add the Alteryx root path to your Path System Variables on your computer.

Access to your system variables varies between operating systems. This is the general process:

  1. On your desktop, access your computer's system security options.

  2. Access the Advanced Options.

  3. Access the environmental variables.

  4. Access the path variable.

  5. To edit the variable, enter or paste the Alteryx path. The default path is C:\Program Files\Alteryx\bin.

Use this method, unless you run the AlteryxEngineCmd.exe from within the Alteryx root folder, or use the entire path to the executable:

"C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe" MyWorkflow.yxmd

Engine Options

AlteryxEngineCmd.exe is a published command-line interface. You can invoke it to run a workflow or analytic application.

If a workflow was saved without AMP Engine enabled, there is an /amp option that allows you to run a workflow or analytic application using AMP Engine on the Windows platform. The /amp option has the same effect as the Use AMP Engine check box in the Designer interface Workflow Configuration Runtime tab.

If you don't specify the engine, the version of the engine that was set when the workflow was saved is used.

Functions

Workflows

AlteryxEngineCmd.exe MyWorkflow.yxmd

This function runs a standard Alteryx workflow (.yxmd) at the command line. It's useful for a series of workflows as a batch that needs to be run in sequence.

Example

AlteryxEngineCmd.exe MyWorkflow1.yxmd

AlteryxEngineCmd.exe MyWorkflow2.yxmd

AlteryxEngineCmd.exe MyWorkflow3.yxmd

Analytic Apps

AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml

This function runs an analytic app (.yxwz) and uses the parameters in the AppValues.xml to dynamically configure the analytic app.

The easiest way to build the AppValues.xml file is to build an analytic app in the Alteryx interface. After you build the app, open Interface Designer > Test View > View. Paste the XML into a text editor and save the file as an XML file.

Example

"<WizardValues ShowDebugMessages='False'> <Value name='FILEINPUT'>TEST.CSV</Value> </WizardValues>"

AlteryxEngineCmd.exe AppValues.xml

This function is identical to the option above except instead of the YXWZ and the XML parameters, it uses the XML parameter and embeds the YXWZ reference in the XML.

Example

"<WizardValues ShowDebugMessages='False'> <Module>MyAnalyticApp.yxwz</Module> <Value name='FILEINPUT'>TEST.CSV</Value> </WizardValues>"

AlteryxEngineCmd.exe "<<raw xml data stream with no quotation marks or line feeds>>"

This function includes the answers to questions in an analytic app. The XML in an analytic app contains answers to app questions.

Example

AlteryxEngineCmd.exe "<WizardValues ShowDebugMessages='False'><Module>MyAnalyticApp.yxwz</Module><Value name='FILEINPUT'>TEST.CSV</Value></WizardValues>"