This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 08-25-201611:49 AM - edited on 03-11-201909:44 AM by SydneyF
If you are using a version of Designer ≥ 2018.3, use the Python tool! If you are on an older version, this article is for you.
Below is an example demonstrating the use of the Run Command tool to execute a Python script in the Designer and use its output in the workflow:
For a Python script, your Command should be Python.exe. If the directory where Python exists is in your system path variable, you can simply type Python.exe. Otherwise you will have to give it the full path, keeping in mind to quote the string if there are spaces (e.g. "Program Files"). In Command Arguments, you will type the location of your Python script (Alteryx's default working directory is the directory of the running module so it may be easiest to keep your script in the same folder to simply type "your_python_script.py" rather than the full path) and any - or -- options necessary. Remember to quote this string!
The example script from the attached simply sends text to a text file to be used as input for the Designer (note: it will not run unless you have configured your python environment😞
As you can see, we’ve successfully executed a python script and used the Read Results input to bring the result of the script into the Designer for further processing.