Category Archives: tabcmd

Tabcmd Part 2

Last year I wrote about Tableau Server’s tabcmd feature here. Well just this week, I’ve been working on a solution that leverages tabcmd. The problem is that we need a PDF copy of one dashboard with more than 5000 options on one filter. Our company has over 5000 franchise hotels in the US, so one per property. Luckily, this can be achieved rather painlessly with tabcmd.

The best way to handle this would be to create a batch file that contains all the commands. This is as easy as launching a text editor and saving the file with a .bat extension. Start by login into your server.

tabcmd login -s http://localhost -t site -u username -p p@ssw0rd!

The -t site is optional. It allows a users to log into a specific site within the tableau server installation. If you’re sharing this code and don’t want your password sent around (good InfoSec practice), you can create just a text file with your password and refer to that file with –password-file pwd.txt.

Next is the meat of the script, all 5000+ iterations. Tableau Server allows for filters to be passed into the URL. I used the export tabcmd to generate a PDF and save to a location.

tabcmd export “workbook/view?Filter=val” –pdf –pagelayout landscape -f “C:\filename.pdf”

There are some options that can be included in the export command, like landscape. Be sure to check the documentation for other possibilities. I used Excel to quickly create each line of the tabcmd, changing the Filter value.

The last thing to remember is to log out of the server. So close the batch file with tabcmd logout. Simply double click the .bat file that was created and your script will start. Thanks for reading and please let me know what you’ve been able to do with tabcmd.

Share Button

Tableau Server Tip – Tabcmd

It’s been a little while since I have been able to post. But here I am back for a quick tip. I’m embarrassed to say that I only recently learned that Tabcmd (I pronounce it “Tab Command”) utilities can be installed and used from other machines, not just the one running your Tableau Server installation. If you’re unfamiliar with Tabcmd, these are a set of command line utilities that allow for automation and batch processing of tasks. This can be very handy when compiled into a BAT file and scheduled as a task.

Or just fun to play with, but be careful. There are delete commands that can be used. For the full list of Tabcmd options, check out the following link.

For you Alteryx users, Tabcmd can be implemented into your module. Interworks published a great article on how to take an output of a TDE and publish it to Tableau Server with Tabcmd. This is where being able to install Tabcmd on your machine shines. You don’t need to have Alteryx installed on your machine running Tableau Server. Check it out here.

Thanks for tuning in.

Share Button