1) Enable Tableau Embedding
- Open your SQL table in Tableau Desktop and create or open a sheet in Tableau as usual. Your View needs to be using the same data source as your superset table. For this example I will make a simple view using my sample data, then walk you step-by-step through the process of embedding the Editable Table.
- Once your view is in place, you should decide on a parameters you will use to connect to your Editable Chart. If you are not using a give unique row ID, that is. When marking a location on your graph, by which parameters can that point be uniquely identified? This example uses a combination of Date and Segment.
- When in your chart, on the bottom left, in the Measures section: right-click and choose Create > Create Parameter. Give your parameter a name and choose its data type. Repeat until you have all your parameters in place.
- Add your view to a Dashboard.
- Display your parameters in the sheet by the clicking More Options > Parameters and selecting your parameters. They will now be displayed in your dashboard. You don’t have to keep them there, but it will be handy when making sure everything is working correctly.
- In the top-bar of your Tableau go to Dashboard > Actions…. From here, hit Add Actions > Change Parameter.
Give your action a name and select the dashboard and sheet you are working with.
The Parameter is the parameter you created in the last step, the Value Field is the Column it refers to in your data.
In this example it is Date > date, and Segment > segment.
2) Preparing the Extension File
In order to embed a Superset chart into your Tableau dashboard, it is necessary to create an extension file for Tableau. For that, you will need the ID of your superset chart and put it into the “.trex” (Tableau extension) file.
- Browse your Superset chart and and copy its URL.
It should look something like this:
Your slide id is the last three digits (
123in this case).
If you’re viewing you chart in Superset, your URL will be much longer and the slide ID will be harder to identify. To get to the shorter ID go through Browse > All Content > Your Chart Name.
- Download the “.trex” file here.
- Open the file in a text editor. Identify the “slice_id” and change it for your id.
- Back in Tableau, double-click or drag an Extension into your dashboard from the Objects section on the bottom left. You will be prompted to select your Tableau Extension file.
- Make sure the correct row is selected in your Extension when you clicking a point in your graph. If not, repeat step the first section of this tutorial.