Beruflich Dokumente
Kultur Dokumente
The Tableau Server Command Tool is one of the two command line tools that comes with Tableau Server. The Command Tool (tabcmd.exe) helps you automate common tasks including batch publishing workbooks and user/group administration. Refer to the Tableau Server Administrator Guide to learn more about the Tabadmin command line utility. The Tableau Command Tool takes a command, an argument, and options as shown in the format below: tabcmd command command-argument [options option-arguments] Using that format and the commands in this document you can run the tool. For example, you could use the following command to create a session on a server called sales-server logged in as Administrator and delete a workbook called Sales_Analysis: tabcmd delete "Sales_Analysis" -s sales-server -u administrator -p p@ssw0rd! When the command is successful, tabcmd will return a status code of zero. A full error message for non-zero status codes is printed to stderr. In addition, informative or progress messages may be printed to stdout. A full log (including debugging, progress, and error messages) is written to C:\Documents and Settings\<username>\Application Data\Tableau\tabcmd.log.
Page 1 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.
Global Options
Some options are common to all commands. The table below shows the options that are used by all commands. The --server, --user, and --password options are required at least once to begin a session. An authentication token is stored so subsequent commands can be run without including these options. This token remains valid for five minutes after the last command that used it.
Option (short)
-h -s -u -p -P -x
Option (long)
Argument Tableau Server URL Tableau Server username Tableau Server password filename.txt
Description Displays the help for the command. Required at least once to begin session. Required at least once to begin session. Required at least once to begin session. You can alternatively use the -P option. Allows the password to be stored in the given file rather than the command line for increased security. Uses the specified HTTP proxy. When specified the command will not prompt for a password. If no valid password is provided the command will fail. When specified an HTTP proxy will not be used. When specified the session id is saved on login so subsequent commands will not need to log in. Use the no- prefix to not save the session id. By default the session is saved.
Host:Port
--timeout
Seconds
Waits the specified number of seconds for the server to complete processing the command. By default the process will timeout in 30 seconds.
Page 2 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.
Commands
Each command that can be used with the Command Tool is described below.
help command-name
Shows detailed usage for the given command.
Example:
addusers group-name
Adds the users listed in the --users argument to the group with the given group-name.
Example: tabcmd
--users
creategroup group-name
Creates a group with the given group name. Use addusers (for local groups) and syncgroup (for Active Directory groups) commands to add users after the group has been created.
Example: tabcmd
creategroup "Development"
createproject project-name
Creates a project with the given project name.
Example: tabcmd createproject -n "Quarterly_Reports" -d "Workbooks showing quarterly sales reports." Option (short) Option (long)
-n -d
--name --description
Description Specify the name of the project that you want to create. Specify a description for the project.
Page 3 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.
createusers filename.csv
Creates the users listed in the given comma separated values (csv) file. The file may have the columns in the order shown below. 1. 2. 3. 4. 5. 6. Username Password Full Name License Level (interactor/viewer/unlicensed) Administrator (system/content/none) Publisher (yes/true/1 or no/false/0)
The file can have fewer columns. For example it can be a simple list with one username per line. When the Server is using Active Directory authentication, the password column should be left blank. Quotes may be used if a value contains commas.
Example: tabcmd Option (short)
Option (long)
--[no-]publishers
--[no-]complete
Page 4 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.
delete workbook-name
Deletes the given workbook from the server. This command takes the workbook name as it is on the server, not the file name when it was published.
Example: tabcmd Option (short)
delete "Sales_Analysis"
Argument Project name Description The name of the workbook you want to delete.
--project
Option (long)
deletegroup group-name
Deletes the group with the given group-name from the server.
Example: tabcmd
deletegroup "Development"
deleteusers filename.csv
Deletes the users listed in the given comma separated (csv) file. The file is a simple list of one username per line.
Example: tabcmd Option (short)
deleteusers "users.csv"
Argument Description When set to complete this option requires that all rows be valid for any change to scceed. If not specified, --complete is used.
--[no-]complete
Option (long)
Page 5 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.
get url
Returns the file at the given URL using an http get command. Instead of rendering html, like a web browser would do, this command saves to a file. The URL should be as it is shown after the view is published. Views can be returned in either .pdf or .png format. Workbooks can be returned in either .twb or .twbx format.
Examples:
tabcmd get "/views/Sales_Analysis/Sales_Report.png" --filename "WeeklyReport.png" tabcmd get "/workbooks/Sales_Analysis.twb" -f "C:\Tableau_Workbooks\ Weekly-Reports.twb" tabcmd get "/user.xml" --filename "UserList.xml"
Option (short)
-f
Option (long)
--filename
login
Logs into the server. Use the --server, --username, --password global options to create a session. If you want to log in using the same information youve already used to create a session just specify the --password option. The server and username stored in the cookie will be used. If you do not provide a password you will be prompted for one. If the --no-prompt option is specified and no password is provided the command will fail. Once you login, the session will continue until it expires on the server or the logout command is run.
Example: tabcmd
logout
Logs out of the server.
Example: tabcmd
logout
Page 6 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.
publish filename.twb(x)
Publishes the given workbook to Tableau Server. By default all sheets in the workbook are published without database usernames or passwords.
Example: tabcmd publish "analysis.twbx" -n "Sales_Analysis" --db-user "jsmith" --db-password "p@ssw0rd" Option (short)
-n -o -r
Option (long)
--name
Description If omitted, the workbook will be named after filename, without the twb or twbx extension. Overwrites teh workbook if it already exists on the server.
Publishes the workbook into the specified project. Publishes to the Default project if not specified. Use this option to publish a database username with the workbook. Use this option to publish a database password with the workbook. Stores the provided database password on the server. If the workbook contains users filters, the thumbnails will be generated based on what the specified user can see. Cannot be specified when --thumbnail-group option is set. If the workbook contains users filters the thumbnails will be generated based on what the specified group can see. Cannot be specified when --thumbnail-username otpion is set.
--thumbnail-group
Name of group
If the workbook contains user filters, one of the thumbnail options must be specified.
refreshextracts workbook-name
Refreshes the extracts of the specified workbook. This command takes the workbook name as it is on the server, not the file name when it was published.
Example: tabcmd Option (short)
refreshextracts "Sales_Analysis"
Argument Description Runs the refresh operation immediately in the foreground.
--synchronous
Option (long)
Page 7 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.
removeusers group-name
Removes the users listed in the --users argument from the group with the given group-name.
Example: tabcmd Option (short)
--users
Option (long)
--[no-]complete
runschedule schedule-name
Runs the specified schedule. This command takes the name of the schedule as it is on the server. Example: tabcmd runschedule "5AM Sales Refresh"
set setting
Enables the specified setting on the server. Details about each setting can be seen on the Maintenance page on the server. Use an exclamation mark in front of the setting name to disable the setting. You can enable or disable the following settings:
embedded_credentials public_users_list remember_passwords_forever Example: tabcmd
set embedded_credentials
Page 8 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.
syncgroup group-name
Synchronizes the group with the given group-name with Active Directory. This command can also be used to create a new group on the server that is based on an existing Active Directory group.
Example: tabcmd Option (short)
syncgroup "Development"
Argument viewer interactor unlicensed Description Sets the license level for all users in the group.
Option (long)
Assigns or removes the System Admin right for all users in the group. If unspecified, new users are not administrators and existing users are unchanged. Assings or removes the Publish right for all users in the gorup. If unspecified, new users are not assigned this right and existing users are unchanged. Requires that all rows be valid for any change to succeed. If unspecified, --complete is used.
version
Prints the version information for the current installation of Tableau Server.
Example: tabcmd
version
Page 9 of 9 Tableau Server Utilities: Tabcmd | Version 6.0 2011 Tableau Software, Incorporated and its licensors. All Rights Reserved.