A relative path is in relation to the location of the App on the users system. For the examples below, let’s assume the Apps are located at C:\Users\ach\Documents\Alteryx
Relative Path Absolute Path Explanation
1) input.yxdb C:\Users\ach\Documents\Alteryx\input.yxdb Current directory
2) .input.yxdb C:\Users\ach\Documents\Alteryx\input.yxdb Current directory (this is the current directory notation I use)
3) .inputs\input.yxdb C:\Users\ach\Documents\Alteryx\inputs\input.yxdb Sub-directory of current directory
4) ..input.yxdb C:\Users\ach\Documents\input.yxdb Back one directory
5) ....input.yxdb C:\Users\ach\input.yxdb Back two directories
6) ......input.yxdb C:\Users\input.yxdb Back three directories
If you have an App that runs from a user’s desktop that uses data shared on the network, you would want to use an absolute path for the shared data and the rest of the inputs and outputs could use relative paths.
The simplest way to set relative paths is to select your input/output files using absolute (full paths) file paths. After the inputs and outputs have been defined, from the Options menu, go to Advanced Options and select Workflow dependencies. From the Workflow dependencies window (shown below), click the “All Relative” button in the bottom left. This will convert everything to relative paths.
In addition to selecting “All Relative” for the entire module, you can also click on the “Edit” buttons and change individual input/outputs to relative paths:
In the screenshot above, you can check which you want modified and then click the “Relative” button to set the selected input/output tools to relative paths.
Huge thanks to Zach for his contribution this week, until next time!
Follow me on Twitter! @AlteryxChad