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.
@silvia_wang I'm attaching an example that worked on my end when you save it in the same directory as your test.py. When using the run command tool, you have to setup at least one of the write source and read results. In your case where you're running a static py file, you don't need either for your process to work. Alteryx still requires one. The easiest thing is to connect dummy data to input of the run command (ie write source) and write the data out to a dummy temp file (I've written out the file %TEMP%dummy.yxdb). We don't need to connect anything to the read results. We put python in the command box. We put test.py in the command arguments. it will generally run python from the workflow directory, but you may need to add the workflow directory directory explicitly (like %Engine.WorkflowDirectory%test.py) if you come across errors with it not finding test.py. It ran fine on my end.
In a more complex case, you could have alteryx and python interacting. You could use the write source of the run command tool to write a csv file out that your python does something with. You could then use the read results to read data back into alteryx. The idea is that the write source is a file that your script can use, and then the read results is reading in the output from your script.