How to install the command line tools in tableau?
Recommended by 0 users
Tableau’s two command tools are tabcmd and tabadmin. Tabcmd provides functions for performing workflow tasks such as publishing workbooks, adding users, or exporting workbooks as image or data files. Tabadmin is designed for server administration-configuring server options, activating users, resetting passwords and other tasks associated with managing the deployment and usage of the server within the enterprise.
Installing the command line tools in Tableau
When tableau server is installed, tabcmd and tabadmin are automatically installed in tableau server’s bin folder. Depending on the operating system being used (window 32-bit or 64-bit) the program will be installed in one of these locations:
- 32-bit – c:\program files\tableau\tableau server\8.0\bin
- 64-bit – c:\program files(x86)\tableau\tableau server\8.0\bin
If you are using an older version of tableau server the portion of the address that says 8.0 should be replaced with the specific version number that you are using. If you are running a distributed environment-with multiple worker machines-and you want to utilize tabcmd on one or more of the worker boxes, you must install tabcmd on those other machines. Tableau provides an installer program for doing that. Those programs are:
- 32-bit – c:\program files\tableau\tableau server\8.0\extras\tabcmdinstaller.exe
- 64-bit – c:\program files\tableau\tableau server\8.0\extras\tabcmdinstaller.exe
Copy the tabcmdinstaller.exe program to the computer where you want to install and double-click on the file to run the program. The program provides prompts as it installs. Tableau software recommends installing the tabcmd program on the root drive (c:\tabcmd).
Since the setup program doesn’t automatically add the bin folder containing tabcmd or tabadmin to the windows PATH system variable, you have to manually navigate to the bin folder subdirectory using the programs. This can be avoided if you modify your computer’s PATH system variable to include the path to the bin folder. Doing this allows you to run the executable commands without any need to manually enter the directory location of the bin folder. To start using tabcmd, open the windows command prompt. Figure 11.1 Shows you how to do that in a Windows 7 environment.
Figure 11.1 Opening windows command prompt
If you are using a different version of windows, find the accessories folder by searching your computer’s hard disk. Once you’ve entered the accessories folder, click on the command prompt to open the command prompt window. In order for you to have access to the tabcmd program files you must first navigate to one of the bin folders listed in the first section. If you are using a 64-bit version of windows, type in the following command and press enter:
This will change the active directory to the bin folder that holds the tabcmd program. Assuming that your tableau server address is http://tableauserver.com , and that your tableau server uses port 80, start a tabcmd session by typing the following into the command prompt window:
Http://mytableserver.com-u USER-p PASWORD
The end of the string immediately following the “.com” is case sensitive.
After entering the tabcmd login command, and the –s site URL, substitute the URL location of your tableau server installation. Then enter your username and password after the –u and –p global option variables.
The instance of tableau server used in this example is a local installation on a laptop. The username is admin and the password is admin. The command line entry to log into this server can be seen in figure 11.2
figure 11.2 tabcmd login example
Notice that the portion of the script that includes the server address also includes an additional element (:8000). This defines the TCP/IP port for the local server instance and is required because the port assigned to the local server isn’t the default value that tableau server normally uses. You can find more details regarding the default port settings in the tableau server online manual by searching for TCP/IP ports. After completing this step you can now issue other commands to tableau server.
Figure 11.3 Editing the PATH system variable through the windows control panel.
Setting the windows path
If you want to avoid manual change of your current directory to the tableau server bin folder every time you run an executable file, add the bin folder to your windows PATH system variable. Edit PATH by going to the windows control panel, click on system, then advanced system settings, and select the environmental variables button to expose the dialog box you see in figure 11.3.
If this seems intimidating, there are free utilities available on the web that makes this process easier, and provide a larger editing window. Figure 11.4 shows a free utility called eveditor in which the PATH has been edited to include the bin folder.
Figure 11.4 Editing PATH using a free editing tool
Adding the path for the tableau server bin folder eliminates need to manually type in the path every time you want to start tabcmd or tabadmin in a batch file. Later you’ll see how to dynamically set PATH commands inside the executable batch files-enabling dynamic setting of the file path so that tabcmd can always find the script that it needs to execute.
Keep in mind that any third-party tools (like eveditor) are not supported by tableau software. You may be successful with eveditor or other tools that you enjoy using, or you may experience problems. But this is out of tableau software’s control.
The installation of Command Line tools is part of Tableau Training.