Updated June 1, 2023
Introduction to Tableau Commands
Tableau provides two command-line tools that automate regular tasks. They are tabcmd and tabadmin. All the functions are available directly within the tableau server’s user interface. Tabcmd provides functions that are responsible for adding new users, exporting images and data files. Tabcmd is not installed on the same machine, this flexibility makes highly beneficial from an administrative and scheduling views. Tabadmin is explored for server administration – configuring the server, activating new users, resetting passwords.
What is Tableau?
Tableau is a data visualization software with interactive dashboards which tells us about the storage of data. Tableau’s actual process is to perform an analysis of data by visualization. Humans have used visualization to describe the data in different insights. Easy to use drag and drop interface. It is being used by data scientists, data analysts in many different industries. It allows business users to create their own reports in an easy manner by then reducing backlog reports.
Basic Tableau Commands
The basic commands are as explained below:
- Start, restart, stop the server
The command is
- tsm start
- tsm stop
- tsm restart
- To set an Encrypted password
Password encryption credentials are visible in a batch script or power shell. TSM is itself a batch file, to run with it requires CALL command. If the user wants to run the script, has to run the ‘test login’ in power shell.
To get an encrypted file:
To view the credential objects in the encrypted file:
Getting the password for the batch file.
- To log in using tabcmd
- Setting Local date
- Creating a session
- Creating a group
tabcmd create group “ library dept”
- Create site users
tabcmd createsiteusers :c:\tc\create user.csv”
csv includes password, username, display name, role, publisher.
- To remove the project
tabcmd delete project “ library Management”
- To update data extract
tabcmd refresh extracts –project “ library management” – data source “ no.of books”
- To check tabcmd dir
Type dir and press enter
displays the version information for the current tabcmd utility.
example: tabcmd version
Intermediate Tableau Commands
The intermediate commands are as explained below:
Tableau Services Manager (TSM)
- Pending/Apply configurations change
To restart the server and topology changes the command is:
- tsm pending-changes apply
- Change in header logos and log-in
To change the header logo for an image in the path the command is:
- tsm customize – header – logo <path>
To change the sign-in logo for an image
- tsm customize – sign in -logo<path>
- Default customizations reset
- tsm customize – restore-defaults
- Enabling repository access
- tsm data-access repository – access enable — repository -username<username> –rep
- disabling repository access
- tsm data-access repository – access disable — repository -username<username> –rep
- Data caching configuration
- tsm data-access caching set –refresh -frequency <value>
<value> option include low, always, 30 or other numerical.
- Tsm authentication
tsm authentication sspi enable/disable [global options]
tsm authentication openid enable [global options]
tsm authentication trusted configure [options] [global options]
tsm authentication trusted configure -th “192.168.1.100”, “192.168.1.101”, “192.168.1.102”
- Tsm data access:
- caching set
tsm data-access caching set [options] [global options]
option include -r, –refresh
the global option includes -h, -p, -s (help, password, server address)
- Data access repository
tsm data-access repository-access enable/disable [options] [global options]
option include –repository-username <username> (eg: username as tableau), –request timeout -restart.
- tsm licenses
- It activates tableau server product key
- tsm licenses activate –license-key <product-key> [global options]
- options include -f (licence file), -k (licence key), -t (trial)
- tsm licenses deactivate –license-key <product-key> [global options]
- tsm license refresh
tsm licenses refresh [global options]
Advanced Tableau Commands
The advanced commands are as explained below:
It is a command line tool, tableau installs this commands to its own folder on the root as c:\drive named tabcmd. We use all these commands in tableau online.
- Adding users to the group
- tabcmd add users “Development” –users “users.csv”
- To create a project
– tabcmd create project – name “Reports” -d “workbook”
-name (name of the project), -d (description of the project)
- Generating PDF’s PNG’s from the command line
we need to login to tableau server with tabcmd.
tabcmd login -s http://tableauserver:80 -u admin -p admin ( u and p stands for username and password)
To get a pdf file:
- tabcmd get /views/ xxx.pdf
- To send emails
we have to install email shareware
- Tabcmd get / views/Wow/xxx.png -f progressReport.png
- publish data source
- tabcmd publish :c:\TC\Sql extracts” -r “TABCMD” -n “Transactions” -db – username “test” –db-password “test” –save -db -password
- To get URL
- It gets the resource from the tableau The result is given in the format of the file.
- tabcmd get “/views/ lib/ management.png” – ppf “ books return.png”
- To run the specified schedule
- tabcmd run schedule “ inventory sales refresh”
Tips and Tricks to use
Tabcmd is a window-based tool used to communicate with tableau Server/online via the command line. It is one of the command-line tools that install with tableau server. They are commonly used to automate common content management tasks in Tableau Server. The main tips are they are used to publish content new and to manage it. The versions to be used is essential, tabcmd be the same version as tableau server. The server password is stored in a separate file for additional security.
Tableau commands run on a tableau server itself. There are about calculating the content on the tableau server. Another benefit is we can type these Tableau commands into a script, then we can automate them to many of the processes. We can automatically refresh tasks using Tableau data extract command – this command comes with Tableau desktop, through which we can refresh and append data to them. Those commands don’t work for multi-connection data sources. The main application of tabcmd in the tableau is to automate the downloading of pdf’s in certain dashboards to distribute to the employees through email.
This has been a guide to Tableau Commands. Here we have discussed basic, intermediate as well as advanced Tableau Commands along with tips and tricks to use. You may also look at the following article to learn more –