Relative paths in Alteryx are great when sharing your workflows between colleagues, and are particularly important in handing over work to clients.
In this post, I’ll summarise how the concept works when using the ‘Input Data’ tool in Alteryx.

 

Relative Paths Use Case

 

It’s at the end of a project and you’ve just presented the final product. Now comes the time to give the client your amazing Alteryx workflows!

The issue here is if you leave your file paths as is, the client will be presented with a screen full of errors. None of the inputs will function – requiring manual work in directing tools to where the files live.

Relative paths work in directing Alteryx to files based on the folder they live in, and where this folder is in the context of the main directory. Using relative paths will allow the workflow to still function, regardless of whether it now lives on another computer or not. If you were to simply click to a file to connect to it in Alteryx, you’d be using what’s called an Absolute Path. An example of this would be something below, where it lists all the folders up to the drive the folders live in.

C:\Users\JoshuaVerbeek\Documents\Project\Alteryx Workflows\Handover\Alteryx Workflows\Test.yxdb

The issue here is Alteryx would still be trying to find this specific directory on someone else’s computer. To replace folders that are subject to change, you need to use full stops to give Alteryx a positional reference.

 

Relative Path Syntax

 

To use relative paths, you must use the full stop (.) to replace folder names that may not be existent on other machines.
If we were to take the example above and want to input from the same folder regardless of what drive or higher folders the files live in, we can place a full stop instead of these higher folders.

.\Test.yxdb

Let’s say that the files we need to bring in live in another folder at the same level of the workflow folder. Well, we can direct Alteryx to this folder whilst still maintaining path relativity.

..\Client Files\Test.yxdb

The two full stops at the beginning tell Alteryx to step back one folder. In this case, it finds the ‘Client Files’ folder within that folder, before selecting Test.yxdb.
This pattern is continued on, with three full stops telling Alteryx to step back two folders, four full stops three folders, and so on.
If the file you need lives in subsequent folders from where you point Alteryx you can then start specifying folders following full stops.

 

There you have it! A quick walkthrough of relative paths in Alteryx, and their importance in project handover.

If you want to check out more of my blog posts, including a crash course in a successful Data School applicationclick here to view the complete list.

 

 

 

Joshua Verbeek
Author: Joshua Verbeek

Josh completed a Bachelor of Psychological Science in 2021, with a focus on research. He discovered a great passion for analytics through the degree. Following graduation, he joined a Market Research graduate program working in data engineering. His decision to join the Data School resulted from a desire to perform analyses, gain insights and communicate results in a visually engaging way. Having previously studied and worked within Graphic Design, Josh is particularly interested in the way data is visualised and presented.