Tableau dashboard extensions are web applications that have two-way communication with the dashboard.
Dashboard extensions enable the integration of Tableau with custom applications, making it possible to modify the data for a viz, or even creating custom visualizations inside the dashboard. It’s a type of extension that can be built using the Tableau Extensions API.
Advantages of Tableau Extensions
- It enables customers to integrate and interact with data from other applications directly in Tableau
- Usage of third-party charting libraries like d3.js to add custom visualizations
- Write-back functionality which helps to modify data in a viz and have that change automatically update the source data in the database or web application
- Build custom viz and interactivity types, such as a filter replacement with a custom interface and network diagram
Steps to follow as prerequisites before creating the extension in your Tableau desktop:
- Requirements for using dashboard extensions in Tableau:
- Tableau Desktop 2018.2 and later
- Tableau Server 2018.2 and later
- Tableau Online
- Download the Tableau Extensions API SDK (.zip file) and extract the files to your computer link
- Start a web server to host the sample dashboard extension:
- Navigate to the “extensions-api” directory
- To install the web server components, run the following npm commands in CLI to install the package:
npm run build
- To start the web server, run the following npm command:
Add an Extension to a Tableau Workbook
Start Tableau and add an extension to the dashboard
- Start Tableau, open a workbook and create a new dashboard
- In the dashboard, under Objects, select Extension and drag it on to the dashboard
- In “Choose an Extension” dialog box, click “My Extensions”. Every Tableau extension has a manifest file (.trex) that describes the extension and identifies the location of the web application.
- Open the DataSources.trex file. The sample extension (web application) appears in the dashboard frame. The DataSources sample finds and displays the data source for each worksheet in the dashboard.
Let's check its Architecture and Code
When we get the value from Dashboard table or worksheet then we hit the Prediction Builder API and it does the entire prediction calculation for us. However, before we start the Prediction Builder, we’ll need to create a story in Einstein Discovery which helps us to calculate the prediction value from it.
To showcase the new prediction value, we need a User Interface where we can edit the values and submit it by clicking the “Submit” button and then hitting the Prediction Builder API to get the new calculated value to display on extension.
This Extension carries the value from the worksheet on a click and allows the user to update those values through the extension. It then hits the Prediction Builder API of Salesforce and calculates the new value. As we move along the extension usage, this will set a benchmark for the Prediction, AI, and Analytics platforms. Keep watching this space for more.