There is no way to write back in the database with Tableau, however you could use URL actions that submit the wanted values to a PHP Web Service. The latter will insert those values into the database. You have a great example of the PHP code for this here, from Aaron Clancy - Re: Can Tableau write data back to the data source?
Do I need to load the dashboard with the extension to the SQL Server (Beta) first and call the REST API for the underlying metadata?
That would be the best way to proceed. have you tested this yet?
Do you have an error when you try to submit?
Lénaïc RIÉDINGER, Global Community Engineer Tableau
If you see a Helpful or Correct response, please mark it thanks to the buttons below the targeted post!
1 of 1 people found this helpful
I'm confused. One of the main benefits of the new Extensions API touted at TC17 was the write-back functionality it would allow. Also, on the product page here it specifically says:
With our Extensions API, developers can create dashboard extensions that enable customers to integrate and interact with data from other applications directly in Tableau.
- Create an extension that has write-back functionality, so users can modify data in a viz and have that change automatically update the source data in the data base or web application
- Build custom viz and interactivity types such as a filter replacement with a custom interface and network diagram
- Integrate 3rd party functionality inside the dashboard
- Interact with data from other business applications directly in Tableau
- Customize Tableau's Desktop environment for a specific team's workflow
Level of Support: Tableau-supported once released
This is new territory so I would recommend contacting Tableau Support. These forums are not Tableau Support, they are supported predominantly by volunteers.
You are correct, with the new Extensions API you will be able to create an extension that enables your users to write back to a database or file. The method (JS, PHP etc.) is up to you once your user hits submit. I found a write back extension (currently in development) written by Andre de Vries that writes back data to a text file. Not exactly your use case but hopefully it can get you going in the right direction!
2 of 2 people found this helpful
I have a working dashboard Extension that writes back to a SQL database. Everything is hosted locally.
Client side -- used HTML, Java Script, Node.js and NPM (Local)
- HTML form -- defines the form field inputs and form action as POST Method
- Application uses Extension API (12.7.0), Favicon.ico, Node.JS, JQuery, and NPM
Server Side -- Uses WCF Web Service created and hosted locally in Visual Studio 2017 to receive the data and TSQL statement to insert data into a table
- SQL Database -- Write a TSQL statement that creates a new data base
- WCF Web Service TSQL Insert statement writes the data to the database
Tableau/Data source Side -- your write back table and tableau data source are set up as individual tables in one Database
- Connect Tableau to the SQL data base in tableau
- Create a data source that joins your superstore data with the write back data
- Connect live to this data source
- Drag the extension object onto your dashboard
- Enter new products into the extension and use the refresh data source button to present updates live in tableau
Is Extensions still in Beta? Can you share the workbook please?
Could you please provide some more detailed information how and what needs to be done on client and server side. Like what all do we need to setup other than base Tableau Desktop and Server software in order to implement, deploy and use Extensions. I have currently set up a 3 node test environment using v2018.2 beta release.
Will look forward to hear from you. Thanks!