Tabcmd Tableau Desktop

  1. Tabcmd Export
  2. Tableau Tabcmd Export

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.

One way to produce a PDF is Tabcmd which is a command-line tool for Tableau Server. It is installed on your local machine and it sends web requests to the Tableau Server to return a PDF report. The second way is the REST API that runs on the Tableau Server and downloads the resulting PDF to your local machine. Both can be automated by common. The Backgrounder runs server tasks, including extract refreshes, subscriptions, ‘Run Now’ tasks, and tasks initiated from tabcmd. The Data Engine creates data extracts and processes queries. The Gateway is a web server that handles all requests to Tableau Server from browsers, Tableau Desktop, and other clients.

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 Tableau Desktop and Tableau Prep Builder from the Command Line(Link opens in a new window).

Before you begin

To install Tableau Desktop or Tableau Prep Builder you will need two things; a Creator product key (the key number starts with the letters TC) and the installer for the version you want to install.

Note: A product key is not required if your organization uses Login-based license management for product activation. For more information see Login-based License Management(Link opens in a new window) in the Tableau Server help.

For information about what applications are included with a Creator product key, see the Tableau Pricing(Link opens in a new window) page.

Where's the installer?

Important: Starting with version 10.5, Tableau Desktop, Tableau Reader, and Tableau Public (desktop) only run on a 64-bit operating system. Tableau Prep Builder is only available for a 64-bit operating system. If you want to install Tableau Desktop on a 32-bit operating system, open the Product Downloads and Release Notes(Link opens in a new window) page and download the installer for version 10.4 or earlier and follow the install instructions in the Tableau Desktop Deployment(Link opens in a new window) guide for that version.

For the most current version of Tableau Desktop or Tableau Prep Builder, go to the Customer Portal(Link opens in a new window) page. In the Product Downloads section, click the appropriate link to download the installer for your product and operating system.

You can also find the installers for all products and versions on the Product Downloads and Release Notes(Link opens in a new window) page.

  1. Open the Product Downloads and Release Notes(Link opens in a new window) page and select Tableau Desktop or Tableau Prep Builder from the list on the left side of the page.

  2. Click on the version you want to install.

  3. In the Download Files section of the page, click on the installer for your operating system to download it.

Where's my product key?

You need your product key to activate Tableau Desktop and Tableau Prep Builder after the install process is finished. If you have a creator license, the same key activates both Tableau Desktop and Tableau Prep Builder. You can always view your product key in the Customer Portal(Link opens in a new window). For more information about license types, see User-Based licenses(Link opens in a new window) in the Tableau Server help.

Note: If you have trouble signing in to the Customer Portal page, or if you need help retrieving your product key, contact Customer Service(Link opens in a new window) and provide your name, company, phone number, and email address.

As a first time user

  1. Sign in to the Customer Portal(Link opens in a new window) page on the Tableau website using your email address and password. The information you need to sign into the portal for the first time is sent to you in a welcome email from Tableau after you purchase(Link opens in a new window) the product.

  2. At the top of the Tableau Customer Portal page, click My Keys.

  3. A table opens, listing any product keys assigned to you. Copy your product key from the Key Name column in the table. Keep this key ready and secure.

    Note: This example does not show any actual keys. The highlighted area shows where your key would be listed.

As an existing user

  1. Open your existing version of Tableau Desktop or Tableau Prep Builder.

  2. From the top menu, click Help > Manage Product Keys.

  3. Copy your product key from the Product Key column in the table. Keep this key ready and secure.

    If you are not able to open the Manage Product Keys dialog to see your key, log into the Customer Portal(Link opens in a new window) and follow the instructions for first time users above.

If you don't have a product key, try the 14-day Free Trial(Link opens in a new window) or download the Tableau Desktop Public Edition(Link opens in a new window) instead. If you are a student or teacher, go to the Academic programs(Link opens in a new window) page to request a license and receive instructions about how to download your copy of Tableau Desktop or Tableau Prep Builder.

Install the product

Tabcmd tableau desktop software

Download the installer using the instructions in Where's the installer? For Mac, the installer is downloaded to your Downloads folder.

Note: The installer detects and displays the user interface based on the operating system display language setting.

If you're using a deployment tool that requires the Windows installer (.msi file) to install Tableau Desktop or Tableau Prep Builder, follow the instructions in Extract and run the Windows (MSI) installer to extract the .msi file from the Tableau installer .exe file.

Click the tab for the product you are installing to view the installation steps.

  1. As an Administrator, log in to the computer where you are installing Tableau Desktop.

  2. Depending on your operating system, do one of the following:

    • For Windows: Run the installer and follow the prompts.

    • For Mac: Open the Disk image file (.DMG) and double-click the installer package (.PKG) to start the installation.

    Drivers for some data sources are installed automatically when you install Tableau Desktop. See the Database drivers installed with Tableau Desktop and Tableau Prep Builder section in the Before You Install topic for specifics.

  3. To enable or disable usage reporting complete the following steps for your operating system.

    This option allows us to gather usage pattern data to improve the product. For more information about this option and how to turn it off after installation, see Turn off usage reporting. For more information about the type of data we collect, see Tableau Product Usage Data(Link opens in a new window).

    Windows

    • To opt out of providing usage data, select the Don't send product usage data check box.

    Mac

    • On the Installation Type step, in the bottom-left of the install wizard, click Customize. To opt out of sending product usage data, select the Don't send product usage data check box.

      On the Mac you can also change the settings on this page to customize your install.

      Note: Starting in Tableau Desktop version 2019.4, only the PostgreSQL driver is installed automatically on the Mac. If you need other database drivers, you can install them from the Driver Download(Link opens in a new window) page.

  4. (Optional) On Windows, to customize the install, on the Install welcome screen, click Customize and change any of the following options:

    • Install location: Specify a different location to install Tableau Desktop.

      Important: If you specify a custom directory for the install location and plan to install future releases to this same location, you need to specify a version specific sub-folder to install to. Otherwise you will need to uninstall the previous version first. Side-by-side installs of multiple versions in the same sub-directory is not supported.

    • Create a desktop shortcut: Clear the check box if you don't want to automatically create a desktop shortcut for Tableau.

    • Create a Start menu shortcut: Clear the check box if you don't want to automatically add a shortcut for Tableau to the Start menu.

    • Check for Tableau product updates: Clear the check box if you want to disable the product update feature. This feature checks for maintenance updates and installs them automatically. If you disable this option at install it also disables the menu option for users. For more information about the product update feature, see Control Product Updates for Tableau Desktop.

    • Install database drivers: Clear the check box if you don't want to automatically install the database drivers. You can also disable one or more of the drivers from the command line. For more information about this option, see Installer properties(Link opens in a new window).

  5. Click Install to begin installation. If you run into any difficulties, see Troubleshoot Your Tableau Desktop or Tableau Prep Builder Installation.

After installation is complete, you will need to activate and register the product to begin using it. For more information, see Activate and register your product.

Important: Tableau Prep Builder is designed to work with Tableau Desktop. It is recommended that you install Tableau Prep Builder on the same machine as Tableau Desktop.
Do not install Tableau Prep Builder on the same computer running Tableau Server. Tableau Server Resource Manager (SRM) can't distinguish between Tableau Server protocol server process and Tableau Prep Builder protocol server process. If the computer resources are exhausted, SRM may terminate the protocol server process belonging to Tableau Prep Builder, which has no recovery mechanism.

  1. As an Administrator, log in to the computer where you are installing Tableau Prep Builder.

  2. Depending on your operating system, do one of the following:

    • For Windows: Run the installer and follow the prompts.

    • For Mac: Open the Disk image file (.DMG), and then double-click the installer package (.PKG) to start the installation.

  3. When prompted, accept the licensing agreement to continue the installation.

  4. To enable or disable usage reporting complete the following steps for your operating system.

    This option allows us to gather usage pattern data to improve the product. For more information about this option and how to turn it off after installation, see Turn off usage reporting. For more information about the type of data we collect, see Tableau Product Usage Data(Link opens in a new window).

    Windows

    • To opt out of providing usage data, select the Don't send product usage data check box.

    Mac

    • On the Installation Type step, in the bottom-left of the install wizard, click Customize. To opt out of sending product usage data, select the Don't send product usage data check box.

  5. (Optional) To customize the install, on the Install welcome screen for Windows or on the Installation Type step for the Mac, click Customize and change any of the following options:

    Windows

    • Install location: Specify a different location to install Tableau Prep Builder.

    • Create a desktop shortcut: Clear the check box if you don't want to automatically create a desktop shortcut for Tableau Prep Builder.

    • Create a Start menu shortcut: Clear the check box if you don't want to automatically add a shortcut for Tableau Prep Builder to the Start menu

    • Enable error reporting : If Tableau Prep Builder has a problem and shuts down unexpectedly, crash dump files and logs are generated and placed in your My Tableau Prep Builder Repository > Logs and My Tableau Prep Builder Repository > Logs > crashdumps files.

      To turn off this option during install, clear this check box during install. To turn this option off after installation see Turn off error reporting(Link opens in a new window).

    • Install database drivers: Clear the check box if you don't want to automatically install the database drivers.

      Important:Tableau Prep Builder is only available in 64-bit and If you already have 32-bit drivers installed, you'll need to install the 64-bit version of those drivers to connect to your data with Tableau Prep Builder.

    Mac

    • Create a desktop shortcut: Select the check box to automatically create a desktop shortcut for Tableau Prep Builder.
    • Don't send product usage data Select the check box to opt out of sending product usage data.
    • Enable crash recovery (version 2020.3.3 and later): Clear the check box to turn off file recovery. In the event of a crash, flow files won't automatically be saved. For more information about managing this option post-install, see Turn off file recovery.
    • PostgreSQL database driver: Clear the check box if you don't want to automatically install the database driver.

      Note: Starting in version 2019.4.1, only the PostgreSQL driver is installed automatically on the Mac. If you need other database drivers, you can install them from the Driver Download(Link opens in a new window) page.

  6. Click Install to begin the product installation.

Activate and register your product

Important: The Tableau licensing service was moved to a new data center on October 6, 2018. This means that any environments that required special configuration (static IP safe listing for example) to access licensing.tableau.com or licensing.tableau.com will need to be updated. For more information, see Tableau Community(Link opens in a new window).

After the installation process is finished, the next step is to register and activate your product. Use one of the following options:

Tableau
  • From the user interface: Follow the instructions in this topic. You'll need the product key that you saved earlier. If the computer where you're installing the product has internet access, the installation process walks you through activating the product.
  • From the command line: For instructions, see Activate Tableau Desktop and Tableau Prep Builder(Link opens in a new window) and Register Tableau Desktop and Tableau Prep Builder(Link opens in a new window).
  • Using Login-based license management: If you are using Tableau Server with a login-based license management enabled product key, you can activate Tableau Desktop and Tableau Prep Builder with one click. For more information, see Login-based License Management(Link opens in a new window).
  • Install offline: If you're installing the product on a computer that doesn't have internet access, or if your company firewall or proxy restricts access to the licensing.tableau.com site, follow the additional instructions in Activate your product offline to complete the activation process. To activate Tableau Prep Builder offline, you must use Tableau Desktop.

  1. After the installation process is finished, open Tableau Desktop. This launches the Tableau Registration form where you can register and activate your product.

  2. Fill out the fields on the registration form and then click Activate Tableau.

    If you are activating Tableau Desktop as a trial, click Start trial now at the bottom of the screen.

  3. Select one of the following options:

    • Activate with a product key: Use this option if you are activating using the user interface and have a product key.

    • Activate by signing into a server:Use this option if you are using login-based license management to activate your product.

  4. If you are activating with a product key, delete any existing text in the Enter product key field, copy your product key (from the location that you saved it to from the Where's my product key? procedure) and paste it into the text box, then click Activate.

    A second screen appears to complete the activation process. Click Continue to finish the process.

    If Tableau can't connect to the site that authenticates that product key, it can't complete the activation and you must activate the product offline. Follow the instructions in Activate your product offline to complete the activation process.

  5. If you are activating using login-based license management enter the URL for your server and click Connect.

    Sign into your server, then complete the registration page if needed, and click Register.

  1. Launch Tableau Prep Builder.

  2. In the Activation page, select one of the following options:

    • Start a trial: Select this option if you don't have a product key but want to try Tableau Prep Builder.
    • Activate with a product key: Use this option if you are activating using the user interface and have a product key.
    • Activate by signing in to a server: Use this option if you are using login-based license management to activate your product.
    • Purchase a license: Select this option to navigate to the Tableau website to purchase a license.
  3. If you are activating with a product key, delete any existing text in the Enter product key field, copy your product key (from the location that you saved it to from the Where's my product key? procedure) and paste it into the text box, then click Activate.

  4. Complete the registration form, and then click Register.

  5. If you are activating using login-based license management enter the URL for your server and click Connect.

    Sign into your server, then complete the registration page if needed, and click Register.

When your registration is complete, Tableau Prep Builder opens and you can start preparing your data.

New to Tableau Prep Builder? Try the Get Started tutorial(Link opens in a new window) to learn how to build your first flow.

Activate your product offline

Note: If you're upgrading versions and you've paid your maintenance (Tableau Desktop only) since the last time offline activation was completed, contact Tableau Customer Service(Link opens in a new window) via email to get an updated product key before continuing with offline activation.

If you're installing the product on a computer that doesn't have internet access, or if your company firewall or proxy restricts access to the licensing.tableau.com site, then you must complete the steps below to finish activating your product. You will need access to another computer that has internet access to complete all the steps in this procedure.

To activate Tableau Prep Builder offline, you will need your product key and Tableau Desktop version 2018.1 or later installed on the same computer that is offline.

  1. In the Activate Tableau dialog, click Activate.

  2. Tableau prompts you to save a file that you can use for offline activation. Click Save.

    Note: If you're performing the offline activation process because of firewall or proxy restrictions, you might not be prompted to save the activation file. In that case, manually disconnect the computer from the network and then restart this procedure so that you can be prompted to save the activation file.

  3. Save the file to a location that you can reach from a computer that does have internet access. Use the default file name (offline.tlq).

  4. Click Exit.

  5. From a computer that has internet access, open a web browser and go to the Activation(Link opens in a new window) page on the Tableau website.

  6. Complete the instructions for Offline Activation to submit your offline.tlq file and create a activation.tlf file.

  7. Save the activation.tlf file and then copy it to the computer where you installed Tableau Desktop.

  8. On the offline computer, double-click the activation.tlf file to perform the offline activation.

  1. Launch Tableau Desktop.

  2. From the top menu, select Help > Manage Product Keys.

  3. In the Manage Product Keys dialog, click Activate.

  4. Enter your Tableau Prep Builder product key and then click Activate.

  5. Tableau Desktop detects that you are offline and shows the following message. Click Save to create an activation file.

  6. Save the file to a location that you can access from the offline computer. Use the default file name (offline.tlq).

  7. From a computer that has internet access, open a web browser and go to the Activation(Link opens in a new window) page on the Tableau website.
  8. Follow the instructions and select the (offline.tlq) file that you just created and upload it to create a create a activation.tlf file. You will need this file to activate Tableau Prep Builder.

  9. Click Upload Activation File. You should receive a confirmation dialog that the upload was successful.

  10. In the confirmation dialog click the link to download the activation file to complete the activation process.

  11. Copy the activation.tlf file to the computer where you installed Tableau Prep Builder.

  12. On the offline computer, double-click the activation.tlf file to perform the offline activation.

  13. Close Tableau Desktop.

  14. Launch Tableau Prep Builder. You will be prompted to complete the registration process form to register the product. If you have previously registered a Tableau product, the fields may be populated automatically.

Change default settings

During installation, Tableau configures default settings for your display language and repository location. If you want to change those settings you can do this after install is complete.

Tableau also enables certain features for you by default such as usage reporting or automated product updates (Tableau Desktop only). For information about how to turn off these features and more, see Change Installation Settings after Installation(Link opens in a new window).

Set your display language (optional)

When you first run Tableau Desktop or Tableau Prep Builder, it recognizes your computer locale using the User Locale setting and uses the appropriate language if it is supported. If you are using an unsupported language, the application defaults to English.

You can configure Tableau Desktop or Tableau Prep Builder to display the user interface (menus, messages, etc.) in a different language by selecting Help > Choose Language from the top menu. Restart the application to apply the change.

For Tableau Prep Builder, the display format for numbers and dates is based on the locale of the operating system on the machine where the application is installed. For Tableau Desktop you can configure date and number formatting for your workbooks. For more information see Language and Locale(Link opens in a new window) in the Tableau User help.

Change your My Tableau Repository location (optional)

During install, Tableau Desktop and Tableau Prep Builder automatically creates a My Tableau <application> Repository folder structure in your documents folder on your computer. If you need to move this repository to another location, for example because you are required to have your data on a network server instead of on your local machine, you can specify a new location and point Tableau Desktop or Tableau Prep Builder to the new folder.

When setting a new location for your repository, the following rules apply:

  • The new folder must be a directory.

  • You must have permissions to write to the new folder.

  • The new folder can't be located in the existing My Tableau Repository folder structure.

Note: Changing the repository location does not move the files contained in the original repository. Instead, Tableau creates a new repository where you can store your files.

  1. Open Tableau Desktop or Tableau Prep Builder.

  2. From the top menu, select File >Repository Location.

  3. In the Select Repository Folder dialog, select a new folder that will act as the new repository location.

  4. Restart the application to use the new repository.

Thanks for your feedback!Tableau tabcmd install

Note from 2017-12-27: You are probably better off looking to this newer post, as later versions of Tableau Server allow this from the UI if you set your workbooks up correctly. The information contained about PDFtk is still useful in tabcmd situations.

Tableau was designed to be interacted with on a computer, and the way it handles PDF export by default reflects the belief that long lists should be replaced with visual cues and filters. Sometimes you want a paper trail — not only that, sometimes it is a legal requirement.

There are plenty of documents out there discussing how to use tabcmd to export PDFs , but you’ll find that the PDFs are basically a snapshot of whatever a worksheet or dashboard looks like in its default state (even using –fullpdf flag on the export command won’t create pages for content that is not visible without scrolling). This post describes a solution to “page” through all of the content in a worksheet and one way to put it all together for export.

Paginating in Tableau

It’s fairly easy to make a paginated worksheet in Tableau. By this, I mean a worksheet that will only show N number of rows per “page”, where the page is a parameter you’ve created. To do this you’ll need two parameters, each set to Integer: Page_Number and Page_Size . Set Page_Number to 1 and Page_Size to 30 as a default. What is nice about this setup is that it is designed to be flexible.

Next, create a Ranking calculation. In the example, I call it [Rank] but I use the INDEX() function; you can just as easily use RANK(). All you want is a distinct number for each row you see.

Lastly, it only takes one calculation to make the pagination filter (mine is called Rank Filter

[Rank]>[Page_Length]*([Page_Number]-1)

AND

[Rank]<= ([Page_Length]*[Page_Number])

Now just drag the Rank Filter calculated field onto the Filter shelf and set it to True.

I’ve got the Parameter controls visible but when we publish we’ll hide them and change them programmatically via URL parameters. Here you can test and prove that your pagination is working correctly.

Hide the parameter controls and publish your workbook up to Tableau Server.

URL Parameters for Programmatic Filtering

Sometimes language fails us, and it definitely does in the case of Filters, Parameters and URL Parameters. In Tableau, there are two separate features called Filters and Parameters. Filters are linked to a field in a datasource, while Parameters are stored at a workbook level and their values are input independently from the data. There is also a feature of Tableau Server which is the ability to use URL Parameters to set the values of both Tableau Filters and Parameters. The format for setting both Tableau features looks exactly the same in the URL — if I have a Field named [Product Name] and a Parameter named [Product Line], the URL to filter that view will look like:

http://{tableauserver}/#/views/{Workbook}/{ViewName}?Product Name=Tableau Desktop&Product Line=Software

When we say “URL Parameters”, we mean this ability, regardless of whether you are setting a Filter or a Parameter in the workbook.

Since we can set the value of Parameters using URL Parameters, we can easily walk through all of the “pages” in our view programmatically — we just count up with …/ViewName?Page_Number=

Creating PDFs Via TABCMD

A “hidden” feature of Tableau Server is that all you have to do to get a PDF is to add .pdf at the end of the view name to have a PDF of the worksheet or dashboard returned, taking into account any URL Parameters. So …/ViewName.pdf?Page_Number=3 will give back the 3rd “page” in a PDF form. You can do this in your browser, but for real exports, you’ll want to use tabcmd.

There are two tabcmd commands that get an export: get and export. This method uses get , looking something like this:

tabcmd get “views/PaginationExample/Pagination.pdf?Page_Number=2&Page_Length=25” -f “page_2.pdf”

PUTTING the PDFs Together

At this point, you’ve probably figured out where this is going — we’re going to loop through and get each page. Two challenges remain: (1) Knowing when you’ve reached the last page to stop requesting more (2) Putting each page together

There’s no way via tabcmd to ask for a particular value from a workbook, so even if we had a calculation to determine the total number of pages, it won’t do us any good. A different method is necessary. When you go to a Page_Number that is beyond the end of the data, tabcmd will return back a completely blank PDF page. This blank page has a very small file size — in my testing it was consistently 1.4KB, but the page size may vary. In comparison, a sheet with any actual information is upwards of 100KB in size. To find when to stop, all that is necessary is looking at the file size of each returned PDF, and if it is small enough, assume that was the first blank page.

Now all that is left is a method for putting all these PDFs together. Here is where I say “this is not supported or recommended by Tableau” — it’s just something I discovered that might help you make your process work. PDFtk Server (https://www.pdflabs.com/tools/pdftk-server/) is a GNU (free as in freedom) command line tool that can concatenate PDF files. The format for the command is

pdftkpage_1.pdf page_2.pdf page_3.pdfcat outputmulti_page.pdf

Tabcmd Export

You can put as many pages in the argument list in the front, and it puts them all together in that order. There are a lot of other functionality in PDFtk but this is all you need at minimum.

Putting All Together

If you know any type of scripting language, it shouldn’t be too hard to make a script that loops through and does all these steps. Not everyone has access to a scripting language, but everyone with Windows can use a batch script. If you save the following as “tableau_batch_pdf.bat” and put it in your Tableau Server bin directory so it can access tabcmd, you can make this work like

tableau_batch_pdf.bat %viewLocation% %final_filename% %page_size%

ex.

Tableau Tabcmd Export

tableau_batch_pdf.bat PaginationExample/Pagination paginated.pdf 25