Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

Updating Python Scripts with Work Flow Data?

8 - Asteroid
Hello All!
Currently I have a long process that ends with a python script that moves around excel sheets (See below).
I attempted to update the script and overwrite full paths. This is not possible. (Can not write to .py)
I am now looking to use the data in my data set as a variable in the script. (To update the File path)
I was thinking -> then using the data read in. Has anyone had luck with a similar tactic?
8 - Asteroid


Can you use code in the Python tool to update your .py file?


A cool thing I saw in the community, but haven't tried, is a macro that lets you read in a .py file and execute the code (within the Alteryx Python tool): Perhaps you could use this to make the updates you need and then execute the script.

8 - Asteroid



Thank you for showing me this. I Have not tested it, however, this is exactly what I was looking for. I am happy it has been Pre-built. I am going to edit some of the process.Then I will message you with an update!