When running Tableau Server, you are able to run a number of queries from Command Prompt (cmd.exe) from the Start bar, and you should right-click and run it as administrator.
Depending on your system, the default line that will show up will be different; in any case, the command line which you should type in to go to the correct directory is;
cd “C:\Program Files\Tableau\Tableau Server\9.0\bin”
Obviously, depending on which version of Tableau Server you are running, you should amend the “9.0” part accordingly – A neat trick here is that cmd.exe actually auto-completes your file-path if you start typing a part of the file-structure, or alternatively will return the files which are in the folder you are exploring.
Once you’re in the ‘bin’ section, you’re able to run tabadmin commands. Here are a few examples;
To display help for all tabadmin commands enter:
tabadmin help commands
Starts the server:
Stops the server:
Configure the server:
Check the status of the server (in detail!)
tabadmin status -v
For further help on Tabadmin commands, check out this post on Tableau’s website.
Are we happy with tabadmin command? Let’s get on with the object of this post – creating .pdf versions of your view.
This is a useful part of the server as if someone wants a snapshot of a view and doesn’t have access themselves, then dashboards can be exported as a .pdfs which make them easy to share and distribute to other people who do not hold server licenses.
There may be a few ways to do this, but the way I am going to talk about is using the tabcmd
So; what you will need is the URL for a workbook or view which you would like to export, and command prompt to enter the command string.
An example from here is;
tabcmd export -t Sales “Sales/Sales_Analysis” –pdf -f “C:\Tableau_Workbooks\Weekly-Reports”
This runs the command which creates a .pdf in the location which you have specified after ‘-f’ (which here would go to C:\Tableau_Workbooks\Weekly-Reports).
The command ‘-t’ searches for the site which you are using (so here could be a full internet URL)
The –pdf specifies the format which you would like to output as – You can also export as -png and -csv.
tabcmd export -t Sales “Sales/Sales_Analysis?:refresh=yes” –pdf -f “C:\Tableau_Workbooks\Weekly-Reports”
If you are using a live database, then you should add “?:refresh=yes” after the URL in order to get the latest snapshot as an output.
I hope that this post has helped you understand how to use tabcmd to export views and dashboards. As always, the Tableau Admin guide is your friend for all things Server related.