Tableau Desktop Command Line

 admin

A dashboard extension embeds a web page and runs a Chromium-based browser inside of Tableau Desktop. Fortunately, you can debug this embedded web browser using the remote debugging abilities built into Chromium.

  1. Tableau Command Buttons
  2. Tableau Desktop Command Line Install
  3. Tableau Desktop Deactivate License Command Line
  4. Tableau Desktop Command Line Commands
  5. Tableau Desktop Command Line Options
  6. Tabcmd Commands
Tableau Desktop Command Line

Debugging an extension involves starting Tableau with a command option to enable remote debugging (over a debug port). You can then run a specific version of the Chromium debugger and connect to Tableau Desktop using the debug port.

Note For Tableau Server or Tableau Online, see Debugging Extensions in Tableau Server and Tableau Online.

Note: If you are looking for information about how to install Tableau Server, see the Install and Configure (Link opens in a new window) section in the Tableau Server Help instead. This topic describes how to install and activate Tableau Desktop or Tableau Prep Builder from the user interface. For information about how to install and activate your product from the command line, see Install. You can automate extract refresh tasks using the Tableau Data Extract Command-Line Utility. This is a command-line utility that comes with Tableau Desktop, through which you can refresh published extract data sources or append data to them from a file. Requirements for using the Tableau Data Extract Command-Line Utility include the following. TABLEAU Online Training by highly skilled industry expert MonsterCourses offers TABLEAU Online training by very experienced and skilled Instructor. We endeavor to deliver the best quality live interactive online training at low and affordable fee.

In this section

Download the Chromium Browser

To debug your extension, you’ll need to use a Chromium-based browser (Chromium is the open-source version of Chrome). In some cases you could use Chrome, but because of version incompatibilities in the debugging protocol, we recommend using specific builds of Chromium, which matches the version of the browser running inside Tableau. Just download and unzip the file and run chrome.exe (Windows) or chromium (macOS).

Tableau Desktop versionChromium versionChrome version
2018.2, 2018.347.0.2526.0Not available
2019.1 and later79.0.3945.0Chrome version 79 or earlier.
Latest maintenance release of 2020.2.7+, 2020.3.6+, 2020.4.2+87.0.4280Chrome version 80 or later.
2021.1 and later87.0.4280Chrome version 80 or later.

Chromium downloads for debugging Tableau 2018.2, 2018.3

Chromium downloads for debugging Tableau 2019.1 and later

Note If you are using Tableau 2021.1, or the latest maintenance releases of Tableau 2020.2.2.7+, 2020.3.3.6+, and 2020.4.2+, you can use Chrome version 80 (or later) for debugging your extension.

Start Tableau Desktop and enable debugging (Windows)

Tableau Desktop Command Line
  1. Exit Tableau if it is already running on your computer.
  2. Open a Command Prompt window.
  3. Start Tableau using the following command.
    Replace <version> with the version of Tableau you are using (for example, Tableau 2018.3).

This command enables remote debugging of extensions for this session of Tableau.

Note: The remote debugging port (for example, 8696) must match the port address you use with Chromium for debugging. This is not the HTTP port that you are using to host your extension, the port that is specified in the manifest file (.trex).

Optional - Create a Tableau shortcut for debugging (Windows)

For convenience, you could also create a shortcut for Tableau and add the remote debugging option to Properties dialog box.

  1. Select Tableau from the Start menu, and then right-click and select Properties or select Open file location.
    If you open the file location, you can create a new shortcut to Tableau.exe (call it something like Tableau - Debug ). Right click the shortcut to open the Properties dialog box.
  2. In the Properties dialog box, append -remote-debugging-port=8696 at the end of the command in the Target text box. The debugging option goes after the closing quotation mark for 'Tableau.exe'.

Start Tableau Desktop and enable debugging (macOS)

  1. Open a Terminal window.
  2. Start Tableau using the following command.
    Replace <version> with the version of Tableau you are using (for example,2018.3.app).

This command enables remote debugging of extensions for this session of Tableau.

Note: The remote debugging port (for example, 8696) must match the port address you use with Chromium for debugging. This is not the HTTP port that you are using to host your extension, the port that is specified in the manifest file (.trex).

Debugging Tableau Desktop using Chrome/Chromium

After you install the Chromium browser and enable debugging in Tableau, you can start debugging your extension.

  1. Open the dashboard with the extension you want to debug in Tableau.
  2. Start Chromium and set the URL to http://localhost:8696
    This will bring up the page selector UI. The port (for example, 8696) must match the port address you specified as the remote debugging port when you started Tableau.
  3. Pick the extension you want to debug from this page, and debug just like you would any other web application (set breakpoints, step through the code, and examine variables).
    Note that the name of the extension is based on the title of the web page that was loaded for the extension. If the extension hasn’t loaded yet the name might be blank. See Debugging loading and initialization issues.

Note that you can only debug one extension, or instance of an extension, at a time. However, you can open a new Chromium tab or window to debug additional extensions.

Debugging loading and initialization issues

It can be difficult to hit breakpoints that occur during the loading of your page because of the remote debugging process. To help with this, you can select a menu option that causes your extension to wait to load until you trigger it to proceed.

  1. Select the extension in the dashboard and select Debug Options > Pause Before Loading from the shortcut menu.
  2. Reload your extension. Select Reload from the shortcut menu.
  3. In Chromium, go to the debugging homepage (http://localhost:8696).
  4. Click the second item listed to attach to the browser instance of your extension.
    Note: When you click the list item, it will be completely blank, but it is really there. The cursor changes so you can select it.
  5. Click the Sources tab in Chromium, under Event Listener Breakpoints, click Script and enable the Script First Statement breakpoint. You just have to do this one time.
  6. In Tableau Desktop, click the extension zone to load your page.
    The debugger will pause each time the first statement of a script runs, allowing you to debug the startup process.
  7. To get to your JavaScript code, click Continue several times. After your JavaScript is loaded, you can set a breakpoint in your startup code.

Known issues with debugging extensions in Tableau Desktop

Reload closes debugging connection (2020.1 and earlier)

While you are debugging your extension, there are times you might want to reload or refresh your web page to execute and debug different parts of your code. However, when you click Reload from the shortcut menu to reload your extension, the remote debugger loses the connection with the extension. The reason for this is that Reload option tears down and re-creates the browser control, which means you’ll need to establish a new debugging session.

Note that you do not need to close and reopen the Chromium browser every time you click Reload. You can start another debugging session by entering the URL (http://localhost:8696) in the Chromium address bar and selecting the extension from the page selector.

For more information, see What Happens When You Reload an Extension.

Configure Tableau Desktop license usage reporting to gather usage information from individual instances of Tableau Desktop and send the information to an instance of Tableau Server that you designate. You can use the information that's gathered to help you manage the Tableau Desktop licenses in your organization. For information about how to track Server Licenses usage, see View Server Licenses(Link opens in a new window) in the Server online help.

Tableau provides the following tools to help you track and manage licensing and usage in your organization.

ToolDescription
Customer portal

The Customer Portal(Link opens in a new window) page on the Tableau website lets you purchase, manage, and view registration information for product keys that are assigned to your users. You can manage your Tableau account on behalf of your organization, download Tableau Desktop installation packages and open and manage current and prior case interactions with Tableau's technical support team.

The portal doesn't provide detailed usage data. However, you can determine who has installed Tableau installations in your organization according to the user registration records that are available in the portal.

Tableau Desktop reporting

For Tableau Desktop (version 10.0 and later), you can configure Tableau Desktop reporting to report usage information to an instance of Tableau Server that's running in your organization. Tableau Desktop reporting gathers usage information from individual instances of Tableau Desktop and sends the information to Tableau Server, where you can use administrative views to track and report on usage.

By configuring Tableau Desktop to report usage information, you can also validate that the product key-registration pairs that are shown in the portal match the activated Tableau Desktop-user pairs in your organization. For more information, see Enable and configure Tableau Desktop reporting. For information about how to track Server Licenses usage, see View Server Licenses(Link opens in a new window) in the Server online help.

Virtual Desktop Support

You can configure Tableau Desktop (version 10.5 and later) to automatically deactivate a license after a predetermined period of time. This feature is intended to support organizations that use non-persistent virtual desktops that might be recycled on a frequent basis without deactivating an installed Tableau Desktop license.

When you configure your Tableau Desktop instances for automatic license deactivation, if a VM is recycled or a computer reimaged, any activated license on that VM or computer will be automatically deactivated after a preset period of time, giving you the option to activate it on a different computer.

For information about how to configure Virtual Desktop Support, see Configure Virtual Desktop Support

Login-based License Usage Report

You can view login-based license usage for Tableau Online or Tableau Server. The report shows activations, creator seats in use, creator seats not in use, and when a creator seat was last used. For more information about how to enable login-based license management, see Login-based License Management(Link opens in a new window).

Enable and configure Tableau Desktop reporting

Tableau Desktop reporting is disabled by default. To use the feature you need to do the following:

  1. Enable reporting on Tableau Server.

  2. Configure Tableau Desktop installations to report to one or more instances of Tableau Server.

Step 1: Enable reporting on Tableau Server

A Tableau Server TSM administrator can enable reporting using the TSM web interface, or from a command line, using the TSM CLI. You only need to do this using one of the procedures listed below.

Tableau command buttons

Use the TSM web interface

  1. Open TSM in a browser:

    https://<tsm-computer-name>:8850. For more information, see Sign in to Tableau Services Manager Web UI(Link opens in a new window) in the Server help.

  2. Click Notifications on the Configuration tab, and then click Events.

  3. Under Server health monitoring, select the Enable Tableau Desktop License reporting box. This configures Tableau Server for Desktop Reporting.

  4. Click Save Pending Changes after you've entered your configuration information.

  5. Click Pending Changes at the top of the page:

  6. Click Apply Changes and Restart.

Use the TSM CLI

To enable reporting on Tableau Server, use the following tsm commands on each Tableau Server instance that Tableau Desktop will report to:

For more information about how to use tsm, see tsm Command Line Reference(Link opens in a new window) in the Tableau Server Help.

Step 2: Configure Desktop for reporting

You can configure Tableau Desktop for reporting license information in one of two ways:

During installation or reinstallation (Windows only)

  • For Tableau installations on Windows computers, you can use installer command properties to specify an instance of Tableau Server to report to and set a different reporting frequency interval.

  • The REPORTINGSERVER property defines one or more instances of Tableau Server where license reporting information is sent. To specify an instance of Tableau Server, use the URL that you would normally use to connect to the server, including the port, if it is not the default of port 80.

    If Tableau Server uses SSL you need to preface the URL with https://, otherwise use http://.

  • The SCHEDULEREPORTINTERVAL property sets the interval in seconds that Tableau will use for reporting to the server or servers.

  • Example

    The following command installs Tableau Desktop and configures it to report to two Tableau Server instances at a reporting interval of two hours.

    One instance (http://mytableau) is using the default port and is not using SSL. The other instance (https://mytableau02) uses SSL and default port 443.

    For more information about using command line properties, see Install Tableau Desktop and Tableau Prep Builder from the Command Line.

Tableau Command Buttons

After installation

  • Add a Windows registry key (ReportingServer) or a Mac .plist file value (com.tableau.ReportingServer.plist) with the address of one or more Tableau Server instances where you want to send the license information.

  • You can configure the Tableau Desktop instance to send reporting information to up to six different servers. You can also edit the registry or .plist file to specify a non-default reporting frequency interval.

    For more information, see Enable Tableau Desktop reporting after installation in this topic.

If you update the registry or .plist file after Tableau Desktop is installed, you need to restart Tableau Desktop for the changes to take effect.

Enable Tableau Desktop reporting after installation

If your organization has already deployed Tableau Desktop and wants to use Desktop reporting, you must update the registry key or .plist file value on each computer where Tableau Desktop is installed.

Windows

  1. As an administrator on the computer running Tableau Desktop, make a backup of the registry file before you make any changes to it.

  2. Open the Registry Editor, and expand HKEY_LOCAL_MACHINESOFTWARETableau. Then edit the registry to create a new key named ReportingServer with these values:

    • Name: Add a string value named Server.

    • Data: Add the URL or URLs of the Tableau Server instances that the Tableau Desktop instance will send reporting data to. Include the protocol (http or https) and the port number if needed. Separate multiple addresses with a comma (,). You can include up to six addresses. Any addresses after the sixth one are ignored.

      For example, the following Server value configures Tableau Desktop to report to two Tableau Server instances. The first, https://mytableau02, is configured for SSL and listens on the default port 443. The second, http://mytableau, doesn't use SSL and listens on the default port, 80.

      https://mytableau02,http://mytableau

    • Name: Add a string value named ScheduleReportInterval.

    • Data: Add the interval, in seconds, at which you want Tableau Desktop to report to the server.

      For example, a ScheduleReportInterval value of 14400 configures Tableau Desktop to report every four hours.

    The illustration below shows what the Server and ScheduleReportInterval keys looks like in the registry editor.

  3. Restart Tableau so the changes take effect.

Mac

Update the .plist file from the /Library/Preferences

Tableau Desktop Command Line
  1. Make a backup of the .plist file before you make any changes to it.

  2. Make the /Library/Preferences location visible by running the following command:

    defaults write com.apple.finder AppleShowAllFiles YES

  3. Create a com.tableau.ReportingServer.plist file in /Library/Preferences with a Server key set to the address of the server you want the Tableau Desktop instance to report to, and a scheduleReportInterval key set to the frequency in seconds that Tableau Desktop should report to the servers.

    Example:

    A .plist file that's configured to send information every four hours to two servers, https://mytableau02 and http://mytableau.

  4. Restart Tableau so the changes take effect.

Tableau Desktop Command Line Install

Update the .plist file from the command line

  1. Make a backup of the .plist file before you make any changes to it.

  2. Open a Terminal prompt as an Administrator and use the following commands to set the address of the server you want the Tableau Desktop instance to report to, and a scheduleReportInterval -string to set the frequency in seconds that Tableau Desktop should report to the servers.

    Example:

    Send information every four hours to two servers, https://mytableau02 and http://mytableau:

    sudo defaults write /Library/Preferences/com.tableau.ReportingServer Server -string https://mytableau02,http://mytableau'

    sudo defaults write /Library/Preferences/com.tableau.ReportingServer scheduleReportInterval -string '14400'

    Important: Do not copy and paste the above examples into the Terminal. Type them in manually to avoid getting an error.

  3. Restart Tableau so the changes take effect.

View Tableau Desktop usage and expiration information on Tableau Server

After you've configured instances of Tableau Desktop for reporting, it sends usage information to Tableau Server. If you've enabled reporting on Tableau Server, you can use the Tableau Desktop License Usage administrative view see license usage data.

The Tableau Desktop License Usage administrative view can answer questions such as:

  • What types of licenses are installed in your organization.

  • Which users have Tableau licenses.

  • Which licenses are used most often and least often.

  • Whether trial licenses need to be converted to paid licenses.

  • Which licenses are expired or might soon expire.

  • When maintenance renewals are due in your organization.

Tableau Desktop Deactivate License Command Line

You can also use the administrative view to identify heavy usage, and you can determine whether specific users have not been using Tableau and might need additional training.

For more information, see Desktop License Usage(Link opens in a new window) and Desktop License Expiration(Link opens in a new window) in the Tableau Server Help.

View login-based license usage

Tableau Desktop Command Line Commands

You can view login-based license usage for Tableau Online or Tableau Server. The report shows users, hosts, user role, product, version, activations, Creator seats in use, Creator seats not in use, and when a Creator seat was last used. You can view data for the past 30 days up to a maximum of 183 days.

To view the Login-based license management License Usage administrative view:

Tableau Desktop Command Line Options

  1. In Tableau Online or Tableau Server, in the navigation pane, click Site Status.

  2. On the Site Status page, click Login-based License Usage.

  3. Optional. On the report screen, you can change the time window to show when seats were last used, filter on actions, filter on user name, and sort by columns.

Tabcmd Commands

Thanks for your feedback!