Hello,
The file types I am using are not supported by Alteryx so I have a python script that converts them to file types supported by alteryx. I have the python tool in my workflow, but I am not sure how to make sure that is the first thing run. If the python script is not run first then the input tools will not be able to find the files as they will not yet exist. I don't want the script to output anything, but that seems to be required so I just added a browse tool after the python tool. Is there a way to have this python tool run then continue with the rest of the alteryx workflow?
Solved! Go to Solution.
Hi @user_7346 ,
The Block Until Done tool will help you control the order of execution in your workflow. I've attached a simple example.
Where would the python tool go in the example provided?
You should be able to achieve this with run command as well.
You can configure a workflow event that would run before the rest of the workflow.
If you want to go the Python route, you can have the python in one workflow, and the "actual workflow" separately. You can then chain the workflows together to run sequentially either using macros, the Runner Crew macros, or chained apps. See this article for more information: https://community.alteryx.com/t5/Alteryx-Server-Knowledge-Base/Chaining-Workflows-Together/ta-p/3857...
Crew macro download here: http://www.chaosreignswithin.com/p/macros.html
Would I be able to set the command as the Python tool? I'd like the user to be able to edit the Jupyter Notebook to be able to change the file path for the folder containing the files they would like to convert. You can do this when clicking on the Python tool, but I'm not sure how it would work with the run command.
That probably wasn't the best example, since in your case you're trying to control the order of *inputs* and the example I attached is more suited to controlling the order of *outputs*.
Block Until Done may provide a viable solution if you can adapt your workflow to use Dynamic Inputs, as shown below:
Hi @user_7346
You said that the Python tool is being used to convert files, since they are in a format that is not supported by Alteryx.
What is the file type prior to conversion, and what is Python converting it to?
We might be able to find an easier solution for you.
Thanks!
Phil
The file types before the python script are not "real" file types. When the input files are generated they take the type after the last "." For example, if a file is named "file.car" the type shows up as a ".car" file. If it was "file.house", then the file would show up as a ".house" file. My Python script just creates copies of these files as csv files.
Hello @user_7346 ,
You don't need the python tool for that. You can just open all the files as csv without an issue. The only thing you need to edit is the delimeter (in my case here I did put no delimeter (\0) and also if you want the first line to have the column names.
Regards
This works perfectly and will be much easier for users who do not know Python! Thank you!