community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE
SOLVED

Alteryx Workflow execution from Command Prompt : Need Urgent Help

Meteoroid

Hi Team

 
We are implementing a workflow in Alteryx tool to perform few operations ( To remove special characters) in a file and the return the data to another file post operations.
 
We have implemented a regular workflow to perform this and its running well.
 
However,we need this workflow to be called from cmd prompt.
 
 
With the guidelines mentioned , we are able to succeed and we used below line from cmd prompt :
 
cmd > AlteryxEngineCmd.exe regexp.yxmd
 
Kindly help us with the details on implementing an alteryx workflow which accepts a file as parameter as we need to pass input file dynamically to the workflow.
 
Example: cmd > AlteryxEngineCmd.exe workflowname.yxwz  testfile.csv

 
We appreciate your quick help on this.
Alteryx
Alteryx

Hi @ynijapuram001

 

You will need to turn that workflow into an analytic app and use an interface tool to pass through a value to the input tool.

 

In the article referenced it explains how to do this:

AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml

This 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 a fully functioning Analytic App in the Alteryx GUI, open the Interface Designer window (View>>Interface Designer), click Test View, and click View. The xml in the pop up window can be copied (using CTRL-C) and pasted into a text editor and then saved as an .xml file.

Example of AppValues.xml:

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

 

AlteryxEngineCmd.exe AppValues.xml

This is identical to the option above except instead of having the *.yxwz and the *.xml parameters, simply specify the *.xml parameter and ensure that the *.yxwz reference is embedded in the *.xml.

Example of AppValues.xml in this case:

<WizardValues ShowDebugMessages="False">

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

 

Best,

 

Jordan Barker

Solutions Consultant

Meteoroid

Thanks Jordan.

I tried to implement as per suggested.

In the first attempt , I used FTSTeam.xlsx file in .xml file and its
content is as shown below:



MyAnalyticApp.yxwz
name="FILEINPUT">C:\Users\ynijapuram001\Desktop\FTSTeam.xlsx




In second attempt , I changed input file to FTS.xlsx and ran the command. I
can see the workflow is still considering the file we gave in 1st attempt.



MyAnalyticApp.yxwz
name="FILEINPUT">C:\Users\ynijapuram001\Desktop\FTS.xlsx


Kindly suggest.

Regards
Yashwanth

Moderator
Moderator

Hi @ynijapuram001,

 

I have attached a basic example for your consideration.

 

File MyAnalyticApp.xml contains both app name and parameter:

 

<WizardValues>
<Module>CommandLineApp.yxwz</Module>
<Value name="FileName">test.csv</Value>
</WizardValues>

 

FileName is the name of the tool which is going to use value test.csv.

 

CommandLineApp_interface.png

 

Result (creation of result.csv):

 

 

 

CommandLineApp_result.png 

 

Kind regards,

 

Paul Noirel

Customer Support Engineer

Meteoroid

I tried creating 2 appvalues.xml files with content as shown below in which
each file pointed to each different file.

However , when tried to run workflow from cmd prompt, irrespective of the
file name given in .xml file , workflow is getting executed as per the
initial design in the workflow.

*.xml file content:*

File-1:


C:\Users\ynijapuram001\Desktop\Yashtest.yxwz
C:\Users\ynijapuram001\Desktop\*FTS.xlsx*


command : C:\Program Files\Alteryx\bin>AlteryxEngineCmd.exe
C:\Users\ynijapuram001\Desktop\Yashtest.yxwz C:\Users\ynijapuram001\Desktop\
*AppValuess.xml*


File-2:


C:\Users\ynijapuram001\Desktop\Yashtest.yxwz
C:\Users\ynijapuram001\Desktop\*FTSTeam.xlsx*



command : C:\Program Files\Alteryx\bin>AlteryxEngineCmd.exe
C:\Users\ynijapuram001\Desktop\Yashtest.yxwz C:\Users\ynijapuram001\Desktop\
*AppValuess2.xml*


Screen shot of execution of two different .xml files where the data is
operating from only FTS.xlsx file in both the scenarios is attached.


--
Regards
Yashwanth

Moderator
Moderator

Hi @ynijapuram001,

 

Your screenshot -shared offline- shows the issue:

 

CommandLineApp_issue.png

 

 

AlteryxEngineCmd will look for the value name mentioned in the xml file. Current error is caused by tool being named "File Browse (6)" instead of "Fileinput".

 

If you rename your File Browse tool to Fileinput, then your test will work:

 

CommandLineAppFix.png

 

New result - following change above:

 

CommandLineApp_result_fixed.png

Kind regards,

 

Paul Noirel

Customer Support Engineer 

 

 

Meteoroid

Thanks Paul.

 

I modified .xml file content as suggested by you changing Value Name in xml file

 

Value name="File Browse (6)" 

 

cmd :

 

C:\Program Files\Alteryx\bin>AlteryxEngineCmd.exe C:\Users\ynijapuram001\Desktop\Yashtest.yxwz C:\Users\ynijapuram001\Desktop\AppValuess.xml

 

However , I can see the workflow is implementing for FTS.xlsx instead of FTSTeam.xlsx file.

Shared screen shot where data got retrieved from FTS.xlsx even though I updated .xml file with FTSTeam.xlsx file.

 

Please suggest.

 

 

cmd.GIF

Moderator
Moderator

Hi @ynijapuram001,

 

Action tool was not configured in the workflow you sent me. 

 

Once fixed (with value name and file browse name set to "File Browse (6)") it is now working:

 

CommandLineApp_result_fixed_2.png

 

 

 

Kind regards,

 

Paul Noirel

Customer Support Engineer

Meteoroid

Thanks Paul.

 
Was a great help.
 
I'm now able to execute workflow by giving file name in .xml file.
 
Will keep you posted if any further issues pops in coming tasks.
 
We are trying to implement this task using node.js
 
Thanks for all your inputs.
Labels