Let's download Tabcmd to our Windows EC2 machine and connect Tableau Server:
- Go to Tableau Server Releases (https://www.tableau.com/support/releases/server) and download tabcmd for your version of the server and your desired OS. I will download tabcmd for the Windows client.
- Install Tabcmd on your machine at C:\tabcmd\.
- Next, we should log in to the Tableau Server. Open CMD and type the following commands:
cd C:\tabcmd\”Command Line Utility”
tabcmd login -s http://ip-10-0-0-35.ec2.internal -u Administrator -p Airmax86
The preceding command line generates the following output:
As a result, we connected to Tableau Server via Tabcmd.
- Next, we will execute a command to export dashboard in PDF. Our Tableau Server has sample workbooks and we will use them. Let's open Regional Workbook and Obesity Map View. We need to copy the individual views' URLs to use it in Tabcmd script.
In the following image I have highlighted the part of URL that we will use for the tabcmd command.
- Let's execute the following command with Tabcmd:
tabcmd export "Regional/Obesity" --pdf --pagelayo
ut landscape -f "C:\Users\Administrator\Desktop\Obesity.pdf"
It will create a PDF file on your desktop, as follows:
In the same way, we can generate Package Workbook or Refresh Extract. We can save this command as a batch file. We need to open notepad, put in all tabcmd commands, including authentication and export commands, and save this for future reference or use for automation.