Tableau Analytics Extensions

Posit Connect can be used to host Tableau Analytics Extensions built in both Python and R. Python extensions are built using the fastapitableau Python package, and R extensions are built using the plumbertableau R package. Both of these packages integrate seamlessly with Connect. You can host any number of Tableau Analytics Extensions on Connect, and Connect will ensure that requests from Tableau are passed to the correct extension.

Setting up Connect

Requirements

  • Tableau extensions are supported and enabled by default
  • Tableau Online or Tableau Desktop (version 2021.4 or newer)
  • Connect must be configured with the following settings:
    • TableauIntegration.Enabled must not be set to False.

    • Server.Address must be configured.

    • Due to how Tableau handles configuring analytics extensions, Connect must be configured on the root path of its domain (i.e.. posit.mycompany.com). You cannot configure Connect as an analytics extension if it is hosted at a domain like posit.mycompany.com/posit-connect without making additional changes to the proxy running in front of Connect.

      See the Configuration section for more information about configuring Connect.

Extensions published to an incompatible Connect server provide a warning message that describes which of the above criteria are not met and potential resolutions.

Extension API requests from an incompatible Tableau product typically fail during the configuration of an external service connection with an authentication error.

Access, Permissions, and Security

Your Connect server must be configured as an Analytics Extension in Tableau. Tableau requires an API key to authenticate with Connect. This API key is used for all requests from Tableau to Connect, and the Tableau instance will have access to any content on Connect that the API key’s owner can access.

We recommend creating a service account (an account used only by Tableau, not by any individual) on Connect, and configuring Tableau with an API key for this account. If you name the service account “Tableau”, simply add the “Tableau” user to the Access List for any extension it should be able to access. This way, you can more finely control what content Tableau can access without affecting any Connect users.

Configuring Connect as an Analytics Extension in Tableau

Before you can use extensions hosted on an Connect server from Tableau, you’ll need to register that server in Tableau’s Extensions settings. The steps to configure analytics extensions in Tableau differ slightly depending on whether you’re using Tableau Desktop or Tableau Server/Online.

  1. Using an administrative account, log into Tableau Server/Online.
  2. Navigate to Settings > Extensions.
  3. Under the Analytics Extensions, select Enable analytics extension for site.
  4. Create a new connection and for the connection type, select Analytics Extensions API.
  5. Select whether you want to use SSL1 and enter the server Host and Port for your Connect server2.
  6. Select Sign in with a username and password. The username is ‘rstudio-connect’ and the password is any valid API key from Connect
  7. Save changes.
  1. Navigate to Help > Settings and Performance > Manage Analytics Extension Connection….
  2. Select Analytics Extensions API.
  3. Select whether you want to use SSL and enter the server Host and Port for your Connect server3.
  4. Select Sign in with a username and password. The username is ‘rstudio-connect’ and the password is any valid API key from Connect
  5. Save changes.

For more information about setting up analytics extensions in Tableau, please see the Tableau documentation.

Using Custom URLs for Tableau Analytics Extensions on Connect

All content hosted on Connect receives a unique identifier, which is used as part of its default URL. You can optionally set a custom URL (also called a vanity URL) for any piece of content on Connect in its control panel. By default, only administrators can assign vanity paths, but Connect can be configured to allow all publishers to assign them.

We recommend using custom URLs for Tableau Analytics Extensions to provide workbook creators with a more meaningful, memorable address (e.g., SCRIPT_REAL("/content/c8b1e158-4fab-4d09-9791-8674afba86eb/predict", ...) vs. SCRIPT_REAL("/loess/predict", ...)).

While custom URLs are best practice for Tableau Analytics extensions, they are not required. You can access extensions published to Connect by their content identifier or vanity URL. If an extension has a vanity URL, Connect will prefer that in all of the documentation it generates.

Additional details

For further information about developing Tableau Analytics Extensions in R, please see the documentation for plumbertableau.

For further information about developing Tableau Analytics Extensions in Python, please see the documentation for fastapitableau.

Footnotes

  1. If you are using Tableau Online, you must enable SSL and use authentication for analytics extensions.↩︎

  2. Due to the way Tableau handles Host and Port, your Connect server must be listening on the specified port on the root path of the provided host value.↩︎

  3. Due to the way Tableau handles Host and Port, your Connect server must be listening on the specified port on the root path of the provided host value.↩︎