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 toFalse
.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 likeposit.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.
- Using an administrative account, log into Tableau Server/Online.
- Navigate to Settings > Extensions.
- Under the Analytics Extensions, select Enable analytics extension for site.
- Create a new connection and for the connection type, select Analytics Extensions API.
- Select whether you want to use SSL1 and enter the server Host and Port for your Connect server2.
- Select Sign in with a username and password. The username is ‘rstudio-connect’ and the password is any valid API key from Connect
- Save changes.
- Navigate to Help > Settings and Performance > Manage Analytics Extension Connection….
- Select Analytics Extensions API.
- Select whether you want to use SSL and enter the server Host and Port for your Connect server3.
- Select Sign in with a username and password. The username is ‘rstudio-connect’ and the password is any valid API key from Connect
- Save changes.
For more information about setting up analytics extensions in Tableau, please see the Tableau documentation.
Using vanity 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 vanity URL (also called a custom URL) for any piece of content on Connect in its control panel. By default, only Administrators can assign vanity URLs, 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
If you are using Tableau Online, you must enable SSL and use authentication for analytics extensions.↩︎
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.↩︎
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.↩︎