Weekly client projects are an essential part of the Data School’s curriculum, and it is great to see your work being applied to real business cases. However, it’s important to know not only how to design a workflow in Alteryx but also how to package and share it with the people who are going to use it further.
One of the most frequent issues when sharing Alteryx workflows is broken path references to input, macros, or output files used in a workflow. The reason for this is the use of paths specific to the computer that the workflow was created in (i.e. use of absolute paths). In this case, once the workflow is moved to another location (e.g. a different folder on the same computer or a different computer altogether), Alteryx won’t be able to find the requested file and the workflow won’t run. To make sure that the references to files used in the workflow are not broken after the workflow is shared, we need to make the references flexible and change all absolute paths to relative ones.
Let’s look at the Workflow Dependencies options in Alteryx to learn how to do it right. As an example, we will look at how we can share this simple workflow I’ve created for my post on removing duplicates.
1 – Once your workflow is finished and ready to share, you need to create folders where Alteryx will look for files used in the workflow. For this example I’ve created a folder called Alteryx_example on my Desktop. There are two folders inside the Alteryx_example folder with the corresponding files inside: Input and Output. The workflow itself is saved directly in the Alteryx_example folder.
If you are using macros in your workflows, I reccommend creating an additional Macros folder inside the main folder where macros files would be saved.
Getting into the habit of creating such folder structure before starting your Alteryx work will save you a lot of time when documenting and sharing your work.
2 – Now let’s navigate to Options > Advanced Options > Workflow Dependencies in Alteryx’s menu.
This menu displays path references in the current workflow, and allows you to quickly update them using the three available options outlined below:
All Relative – changes all file dependencies to a path relative to the workflow location.
All Absolute – changes all file dependencies to absolute paths pointing to the exact locations in the current computer’s folder structure.
All UNC – changes all file dependencies to a Uniform Naming Convention.
In the screenshot below note how the workflow path is displayed at the bottom of the Workflow Dependencies dialog for reference and all paths are currently absolute (i.e. they refer to specific locations in my computer).
3 – By default, the Workflow Dependencies dialogue shows tools grouped by type: in our example it is Input and Output. You can also see each individual tool and edit its dependency by clicking on the Show Individual Tools link in the top left corner of the dialogue.
In this example, input and output files are saved in the correct folders, so we can change their paths to relative by clicking on the All Relative button in the Workflow Dependencies dialogue.
4 – If you want to edit each dependency individually, click on the Edit button next to the relevant dependency and change its properties in the new dialogue. If you are not sure if the dependencies’ paths are correct, click on the Test button in the dialogue to check it.
5 – It is important to remember that some tools cannot be edited using the Workflow Dependencies menu. Instead, you should use the relevant tool’s configuration menu before sharing the workflow. For more details, please see the list of such tools on the Alteryx Help page.
6 – Finally, with all paths now made relative, we can safely compress the project’s folder with all its contents (in this example it is the Alteryx_example folder) and share it with clients or colleagues who will use it further. If all dependency paths have been made relative, the workflow should run smoothly on other computers, but it may be a good idea to test it first on another computer or run it from a USB stick.