The REST API provides a data retrieval method directly to Tableau using the following steps.
Generate the REST API token
- You must be an administrator to create the token from the API (REST) Add-On configuration page from the Add-Ons Home
- Note the REST API base URL on the following page as we will refer to it later.
- Click Create REST API Token.
- Select the User Context for the data retrieval and click Create Token.
Make Sure Your Token is "Web App Enabled
When you create your token in PI, be sure that you check this "Yes" so that this procedure will work:
After creating the token, that long string of letters and numbers will be what you enter into whatever platform you're linking with PI, like Tableau.
Use a web data connector
Test and vet the web data connector
You should use a web data connector that you trust. If you are unfamiliar with the web data connector, you or your Tableau Server administrator should test and vet the web data connector before you use it. For more information, see Testing and Vetting Web Data Connectors(Link opens in a new window) in the Tableau Server Help.
How to use a web data connector on Tableau Server and Tableau Online
For more information, see full article here.
Connect to the data source
Start Tableau and under Connect, select Web Data Connector. For a complete list of data connections, select More under To a Server.
Enter the API URL, and then press Enter.
Note: If you enter a URL to a website, rather than to a web data connector, an error message will appear.
If the connector displays a web page, enter any information that you're prompted for, and then submit the page.
Wait while the connector retrieves your data and imports it into Tableau as an extract.
Select the sheet tab to start your analysis.
Web data connector data source example
An example of a web data connector data source is shown below. The first time you connect to a web data connector, the connection page outlines how to connect to the web data connector.
After you connect to a web data connector, on the connection page, you can do the following:
View a history of all the web data connectors that you've connected to, or clear the history, in the drop-down list in the address bar.
View your five most recently used connectors under Recent Connectors.
Select links at the bottom on the window to learn more about web data connectors:
What's this? links to an overview of this feature.
Use a connector links to this topic.
Build a connector links to the Web Data Connector SDK(Link opens in a new window), which provides tools and documentation for building a web data connector.
After you connect, you can make the following configuration changes to the data source before you start your analysis.
Sort fields and rows – From the Sort fields drop-down list, select how you want to sort the columns in the grid or metadata grid. Sort the row values by selecting the sort button next to the column name.
Rename or hide columns – Select the column header drop-down arrow and select the option you want.
Split columns – Depending on how the data is structured, you can split the columns in your data into new fields. For more information, see Split a Field into Multiple Fields.
Create calculations – Create a new calculation based on an existing field in the data source.
Copy values – Copy values in the grid by selecting the values and then pressing Ctrl+C. Alternatively, to copy values in the metadata grid, select the values, right-click, and then select Copy.
Add new or edit other data sources – Select the drop-down arrow next to the data source.
Tableau support for Web Data Connector
Tableau provides limited customer support for connections using the Web Data Connector. Tableau does not provide support for connectors or for other programs written to interface with the WDC API. However, you can submit questions and ask for help on the Tableau developer community forums (Link opens in a new window).
Tableau does provide support for the WDC library and SDK though. If you find an issue with the WDC library, the simulator, or any of the developer samples, submit an issue on Github (Link opens in a new window).