Is my python tool being executed even though its not connected to any other tools?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I have a python before my workflow. This python is to move a file to my network drive. Which I cannot do in my later python for reasons out of my control.
My first python moves a local file to a network drive. My workflow reads that file in the file input tool and then does some more python ontop of that.
How can I rework this? I dont think my first python tool is doing anything as it is not connected. But I must move my python to network file and THEN read it in.
Any advice would be appreciated.
- Labels:
- Custom Tools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I'm 95% sure that your python tool will run even if it is not connected.... If you need to trigger execution (ie python tool and then input data tool) add your input data part to a macro and trigger it with dummy data passed after your python tool. If you want input data tool and then unconnected python tool - do the opposite (python in macro). Basically - macros and dummy data/append fields/block until done are your friends here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @wonka1234
One way to do this:
1)You can add this piece of code at the end of the first python tool. This will basically write a column AllowContinue with the value 1 after the file is moved
data = [{'AllowContinue': 1}]
df = pd.DataFrame(data)
Alteryx.write(df,1)
2)then you can use the append tool to allow the rest of the workflow to run after 1 is executed. Use the dynamic tool to read the file
A similar idea was used here if you want to check out: Create directory if not exists and save the ouput - Alteryx Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
im confused on how this works.
do you have a workflow?
What is in the append tool?
How do I read in my network file?
why text input?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @wonka1234
can you share your workflow?
What is in the append tool? Nothing, just allow more than 16 records on it.
How do I read in my network file? With the dynamic input tool
why text input? To put the filepath of your input on it, it will be used on the dynamic input tool
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Check the attached example. It is FIRST executing the python code and AFTER THAT reading the file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can search the tools on the upper right search box of your alteryx and see examples of how to use them
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Im trying to use it. It cannot find my path.
What settings did you use in the dynamic path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
On the edit, put the path of your file
On the field, put the column that is passing the filepath
On the Action, put change entire filepath