I have built some pretty neat things using the Python Tool. The only thing I cannot seem to do is get a copy of the Jupyter notebook file to save elsewhere.
I know you can click on the Production tab(?) and copy all the code, but I would really prefer to keep the Jupyter notebook with all the markups I've done.
Any suggestions out there? Thanks!
Solved! Go to Solution.
I’m interested too!
I don’t know of a native way to do this in Alteryx, although I'm newer to Python & the Python tool in Alteryx. I think you could possibly write a Python script that reads the Alteryx workflow XML file, extracting the Python code and any Jupyter metadata. Then, use this extracted information to reconstruct the .ipynb Jupyter file format. It’s a complex approach but if you are doing it a lot it might be beneficial. I've done some simple XML editing to speed up things like mass re-names, but everything was contained in the Alteryx platform. I’m also interested to see if anyone else has a good approach to this.
Keep up the momentum on this, everyone! I’m doing a lot of research and will hopefully get an answer one way or another and let you know!
I found the following article that appears to answer the mystery:
https://knowledge.alteryx.com/index/s/article/How-to-Locate-the-Python-Tool-Jupyter-Notebook-File
How to Locate the Python Tool Jupyter Notebook File Workbook.ipynb
This article describes how to locate the Workbook.ipynb file behind the Python Tool in order to check access rights and resolve certain errors (most commonly, 404 errors).
Prerequisites
Procedure
In a Python Tool, paste the following code:
import os current_path = os.getcwd() print(current_path)
This will return the path of the working directory. This directory contains the Workbook.ipynb file.
Great! Thank you @BretCarr