In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Updating Python Scripts with Work Flow Data?

CamodCPA
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 Alteryx.read() -> then using the data read in. Has anyone had luck with a similar tactic?
2 REPLIES 2
KP_DML
8 - Asteroid

Hello,

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): https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Python-Code-Tool-Script-Runner-Macro-C... Perhaps you could use this to make the updates you need and then execute the script.

CamodCPA
8 - Asteroid

KP,

 

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!

Labels
Top Solution Authors