We have users that need to use Excel workbooks as datasources in their Tableau dashboards which are then published to Tableau server. However the problem lies with how Windows and Tableau use the network path names.
Most people will connect to a shared drive by mapping a network drive, like this
And map the network drive to a letter, in this case Z.
Now all that works fine and Tableau desktop will happily connect and all is right in the world. But if you then publish that workbook to the server, the problem arises with that drive letter. Tableau server has no idea what that Z drive is, it thinks it's a local drive on the server box somewhere and so it cannot find the correct file. This makes for a sad panda.
Instead we need to make sure that Tableau uses the UNC path name. The UNC path in this example is \\fastnfs\tableau_data_sources, the same that we used when we mapped the drive to the letter Z.
Even though from here it knows the UNC path..
You can see the path that the data source is using by right clicking on the name in the data window and selecting properties
and if we click on the filename in the data connection window we can see it's defaulted back to use the drive letter.
To fix this we need to edit that path to be the full UNC one
And then if we publish, Tableau server knows where to go and look for the file, assuming you have giving the Tableau Services user access to the directory.
This all works fine, except it relies on someone remembering to manual edit the path name to the full UNC path and not the driver letter name.
The good news is that there is an easy solution to this and it's how you set up your access to the shared network drive in the first place. Instead mapping a network drive you map a network location. The process is the same as mapping a drive, except it doesn't get a drive letter.
Choose the custom network location, click next.
Put in the UNC path for your shared drive
Give it a name
click finish and voila
We now have a new network location, note the different icon.
Now if we create a data connection and use that instead of a lettered drive
And then check the data source properties we see it's got the correct UNC path, we havent typed a thing, not had to edit anything.
Hope this helps anyone using files on a network share as a data source, if you need any help setting this up, just give me a shout.