Skip navigation

Relative Paths for Data Sources

score 42
You have not voted. Active

Say there is a Tableau workbook at /Users/me/myworkbook.twb, connected to a csv data source at /Users/me/mydata.csv. Currently, data sources are specified in .twb files as full paths (e.g. /Users/me/mydata.csv). This creates a few problems:


  1. Tableau workbooks and their data sources cannot be moved to another folder. For example, if both files were moved to the /Users/me/project folder, Tableau would not be able to find the csv file, since it still looks for it at /Users/me/mydata.csv instead of /Users/me/project/mydata.csv.
  2. A corollary of the first problem is that workbooks and related data sources cannot be easily shared with colleagues, as they probably have a different folder structure on their computers.
  3. This means collaboration using a shared file repository like Dropbox or Github would also be impossible.


One workaround is to manually edit each .twb file (since they are XML files) and replace all full paths with relative paths. But this has to be done every time a workbook is saved, and becomes very cumbersome when dealing with dozens of workbooks.


Another workaround is to use packaged workbooks (.twbx), but this creates unnecessary copies of the data sources. For example, if there is a 1GB data extract (.tde) being used by 10 .twb files, it is possible to create 10 .twbx files and share them with colleagues. But this creates 10 copies of the .tde within the .twbx files, so everybody gets hit by large file sizes.


My suggestion is for Tableau to save .twb files with relative paths by default, and provide an option to save the full file paths of external resources, if the user desires.