Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

May i run a Unix command in Alteryx? (file.sh)

Krasus
8 - Asteroid

In fact i'm trying to run a Unix command in Alteryx(file end with .sh).

 

But even the Run command tool I can't understand how to use it (i try to find an exemple from the internet but i can't).

 

Somebody have an idea for my case? or just upload me some exemple files to learn how to run the Run command tool.

 

Thanks a lot! Smiley HappySmiley HappySmiley Happy

3 REPLIES 3
RodL
Alteryx Alumni (Retired)

There have been a couple recent posts which related to using the Run Command tool with examples...

 

http://community.alteryx.com/t5/Advanced-Analytics/Run-Command-Dynamic-Arguments/m-p/762#M44

and

http://community.alteryx.com/t5/Data-Sources/Working-with-files-rename-chance-file-extension-change-...

 

Also, the Help on that tool has some detailed info on configuring.

AdamR_AYX
Alteryx Alumni (Retired)

So I'm presuming that you have cygwin or similar installed on your windows machine to let you run the Unix scripts.

 

If so then you want to use sh.exe to run the script.

 

Check out the attached example module

 

UnixScript.png

I write out a batch file into the temp directory with the following contents

 

sh TestScript.sh > C:\ProgramData\Alteryx\Engine\Engine_87876_d29323ff3f784f418629f77043215b71_\log.txt 2>&1

 

Which will run my sh file and pipe its output to log.txt in the Alteryx temp directory.

 

This batch file gets run by the run command.

 

The Run command then reads in log.txt and shows its output in a browse.

 

Unfortunately my workflow has two import errors which are not real errors.  So when it asks do you want to load the workflow and run Workflow Dependencies? Press Yes then OK on the next screen.

Adam Riley
https://www.linkedin.com/in/adriley/
_raghav
6 - Meteoroid

Hello AdamR,

 

I have a separate set of Unix servers, which host among many things, my R, python, shell and other components.

I dont have the privilege to install Cygwin on the windows server hosting Alteryx Designer or Server.  Is there any other way I could launch the unix components on the remote servers ?

 

thanks

raghav

 

Labels