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.
So, this should be fairly straightforward, but for the life of me I cannot figure it out. I have a Python script and I would like to run it in Alteryx. So I am using the command tool, telling it to run cmd.exe, I am attaching my script in the command arguments box and in the read results box I have added the file to which it should write.
Yet when I go and run it, it opens up the command line box but nothing happens, it seems that it is not picking up the argument and running it.
This just runs the workflow (does not return data), so you'll probably want to add an Output tool to your workflow to have Alteryx write the data you care about out to a format that you can then read in with Python (such as csv or sqlite) after the workflow execution has completed.
@michael_treadwell Hello! thanks for the write up. Few months back I used this tip to set up my .py codes running. Now, as my team gets bigger I would like to share my codes and also have it accessible so eleminating the need to recreate bigger processes.
I use miniconda3 that comes by default with ALteryx and in order to make it work as expected I have to keep my scripts on the desktop only. This makes my WFs non shareable or run from a different designer installed in a desktop.
Question: Do we have a possibility to call python scripts that are housed in a network aka shared folders? Spent enough time but not able to crack it. This makes me keep different version of codes at multiple places and maintain it. At times its gets messy and I lose control over the code.
Any sort of help would be much appreciated. looking forward.
Sorry, but you can only run Python scripts that activate Designer workflows if you have a Scheduler or Server license. The reason is that if Python scripts were allowed then it would remove the necessity to use the basic tools of Server and Scheduler.
If I may throw in a question about my own situation:
We're going to start using Python scripts to download data from our providers to fill out Excel files, then use Alteryx to combine them together into one data set before sending to our warehouse. The order of events should be this:
Python script executes
Alteryx reads the files and sends them to the database.
If I use the Run Command Tool to do this, can I be assured that it will correctly pull those events in the order required? In other words, I don't want to set up the Read Results line to pull in the final data set, only to discover it's reading data that was processed the previous day, if that makes sense.
@plundgren It works well if the design is solid. I have codes set up a year back and it works as expected. The only catch is that you need to have administrator rights to have your packages installing in python setup inside the alteryx. Only then the codes will run as expected. if not I would suggest to use an IDE to download files in a drop zone and use the WFs to pull them later for processing.