1
votes

How can we make the Tableau dashboard templated? We would like to create just the template/wireframe of our reports and as the client requests we should be able to fetch that specific data and generate the report and display it to the client on tableau embedded-web?

1

1 Answers

1
votes

There isn't a good way to do this, but there are some hacky workarounds.

Option 1: Separate DB Servers for each Client, Same Schema

If each client has a separate database server with the same schema, you can use the Tableau Server REST API to duplicate the workbook and data source for each client, then use the Update Data Source Connection endpoint to change the database server the data source points to to the new client's.


Option 2: Same Database Server and Schema

  1. Create a column in your database table named 'client' and set it to the client's ID or client's name in all of your rows
  2. Create a parameter in your Tableau workbook named "Client"
  3. When connecting to the database and table in Tableau, you can use a custom SQL statement such as: SELECT * FROM table WHERE client=<Parameters.Client>
  4. Once you have the workbook loaded, you can use the JS API method Workbook.changeParameterValueAsync() method to set the Client parameter to the appropriate client ID

This has some critical security issues: If the user is able to figure out the client ID of another client, they can get their data. They can also brute force this by calling changeParameterValueAsync themselves.