Skip navigation
2016
Sankarmagesh Rajan

Email Subscriptions

Posted by Sankarmagesh Rajan Jun 23, 2016

Install tabcmd

By default, the tabcmd command line utility installs with Tableau Server to the server's bin folder (for example, C:\Program Files\Tableau\Tableau Server\9.3\bin). You can run it from there. For administrative flexibility, you can also install it on another machine.

If you installed the tabcmd command line utility on computers that are not running Tableau Server and you are upgrading Tableau Server to a new major version (version 9.2 to version 9.3 for example), Tableau recommends you also upgrade standalone installations of tabcmd to avoid any potential incompatibilities between versions.

To install tabcmd on another machine:

  1. 1. Navigate to the extras folder on Tableau Server:C:\Program Files\Tableau\Tableau Server\9.3\extras\TabcmdInstaller.exe
  2. 2. data-mc-conditions="Product.serverserver" style="margin-top:9px"
  3. 3. Double-click TabcmdInstaller.exe to run it.
  4. 4. Follow the prompts to install tabcmd.Because tabcmd is a command line tool, and due to some limitations with the Windows operating system, Tableau recommends that you install tabcmd in a folder named tabcmd at the root of the C:\ drive (C:\tabcmd).

if you installed 64 bit machine with 32 bit tabcmd then go with C:\Program Files(x86)\Tableau\Tableau Server\9.3\extras\TabcmdInstaller.exe

Follow the steps with open source command line tool:

:: Change directory to tabcmd location

cd "C:\Program Files\Tableau\Tableau Server\7.0\bin"

:: login to Tableau via tabcmd

tabcmd login -s http://localhost --username u1 --password p1 --no-prompt

 

:: run tabcmd get command which retrieves the URL of the reports with the filter and size parameter

:: reports are saved to pdf

tabcmd get "views/workbook/report1.pdf?param=value&:size=1680,1050" -f "C:\report1.pdf"

tabcmd get "views/workbook/report2.pdf?param=value&:size=1680,1050" -f "C:\report2.pdf"

 

:: logout of tabcmd when done

tabcmd logout

 

:: use pdftk library to combine reports based on system

pdftk "C:\report1.pdf" "C:\report2.pdf" cat output "C:\report.pdf"

 

:: send email with pdf attachments using blat

blat "C:\report-email-message.htm" -t email@email.com -attach "C:\report.pdf" -s "email subject" -html

 

:: delete all pdf files generated during the process

del "C:\report1.pdf" "C:\report2.pdf" "C:\report.pdf"

 

write the above code in notepad and save as .bat file.

 

- schedule the above script with Windows scheduler

- note that you will need 'blat' and 'pdftk' installed, these are free tools

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


Follow the steps with Febootimail command line tool:

:: Change directory to tabcmd location

cd "C:\Program Files\Tableau\Tableau Server\7.0\bin"

:: login to Tableau via tabcmd

tabcmd login -s http://localhost --username u1 --password p1 --no-prompt

:: run tabcmd get command which retrieves the URL of the reports with the filter and size parameter

:: reports are saved to pdf

tabcmd get "views/workbook/report1.pdf?param=value&:size=1680,1050" -f "C:\report1.pdf"

::if you need two views then add another one get command
 

tabcmd get "views/workbook/report2.pdf?param=value&:size=1680,1050" -f "C:\report2.pdf"

:: logout of tabcmd when done

tabcmd logout

:: send email with pdf attachments using Febootimail

febootimail.exe -SMTP yourSMTPhost.yourcompany.com -TO "recipient1@yourcompany.com; recipient2@yourcompany.com;recipient3@yourcompany.com" -FROM sender@yourcompany.com -SUBJECT "Generated Tableau View - Tableau Server Automated Alert System (TSAAS)" -ATTACH "C:\Program Files\Tableau\Tableau Command Line\progressReport.pdf" -BODY"this is the text of the body"

 

write the above code in notepad and save as .bat file.

- schedule the above script with Windows scheduler

 

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

Follow the steps with Send email command line tool:

Automated PDF Email Distribution of Tableau Views Using Tabcmd, send email command line tool and Windows Task Scheduler.


:: Change directory to tabcmd location

cd "C:\Program Files\Tableau\Tableau Server\7.0\bin"

:: login to Tableau via tabcmd

tabcmd login -s http://localhost --username u1 --password p1 --no-prompt

:: run tabcmd get command which retrieves the URL of the reports with the filter and size parameter

:: reports are saved to pdf

tabcmd get "views/workbook/report1.pdf?param=value&:size=1680,1050" -f "C:\report1.pdf"

::if you need two views then add another one get command

tabcmd get "views/workbook/report2.pdf?param=value&:size=1680,1050" -f "C:\report2.pdf"

:: logout of tabcmd when done

tabcmd logout

write the above code in notepad and save as .bat file.

Here is an example that sends as an e-mail attachment PDF report you generated. Save the example as Batch file and schedule via windows task Scheduler.

cd C:\Program Files\Tableau\Tableau Server\8.2\bin

tabcmd login -s https.xxxx.com -u Username -p pwd

[If no certificate checks then use:

tabcmd login - https.xxxx.com -u Username -p pwd --no-certcheck]

tabcmd export IncidentDashboard/IncidentDashboard --pdf -f "C:\ProgramFiles\Tableau\TableauServer\8.2\bin\Tableau_Workbook\IncidentDashboard.pdf" --no-certcheck

tabcmd export ScenarioReport/ScenarioDashboard --pdf -f "C:\ProgramFiles\Tableau\TableauServer\8.2\bin\Tableau_Workbook\ ScenarioDashboard.pdf " --no-certcheck

 

Above command will save as batch file and run via task Schedular.

- schedule the above script with Windows scheduler

 

Thanks

sankar

Re: Emailing the CSV files generated by TABCMD