Alteryx Designer Desktop Discussions

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

Access Jupyter notebook file?

BretCarr
10 - Fireball

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!

5 REPLIES 5
caltang
17 - Castor
17 - Castor

I’m interested too!

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Kaizen
5 - Atom

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. 

BretCarr
10 - Fireball

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!

BretCarr
10 - Fireball

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

  • Alteryx Designer
  • A workflow containing a Python Tool

 

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.

caltang
17 - Castor
17 - Castor

Great! Thank you @BretCarr 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels