Tableau Extension API – Write Back – Updated Source Code for Tableau 2018.2

Kommentare : 23

Due to the Google Analytics analysis I’ve done for the current quarter one can easily see that you – the Tableau community which we call “Tableaufans” – have been asking for more write back content. Would you agree?

So as a very first step I’m going to attach a quick tutorial around how to get “Tableaufans-WriteBack-2018.2” up and running for Tableau’s latest release (2018.2) and above. If you haven’t heard about “Tableaufans.com’s Write Back Extension” yet, you might want to watch the ~4min video from one of the previous posts to understand what you could get by following these steps.

  1. In order to be able to leverage the write back extension you need to have a webserver and a MySQL database
    1. I’m using XAMPP version 7.0.23 which contains both. You can download it here.
    2. Once you’re done downloading it you can extract the folder directly into C:
      (By copying it directly into C: it would simply allow you to follow all of my tutorials around extensions and JS API just a little bit easier in the future.)
    3. Start “C:\xampp\xampp_start.exe” as administrator
  2. Download the latest extension-api-master here: https://github.com/tableau/extensions-api
  3. Extract the content and paste it into your webserver (C:\xampp\htdocs)
  4. Extract the zip below and create a new file path where you extract it’s content into:
  5. Extract the *.trex file and copy it into C:\Users\<USERNAME>\Documents\My Tableau Repository\Extensions
  6. Make sure your XAMPP (Webserver+MySQL database) is up and running
    1. Apache should use port 8888
    2. Mysql 3306
      -> (If this is not the case, please change your ports accordingly as it will help you to use more assets from Tableaufans.com in the near future)
  1. MySQL should have a database called ‘yoursqldb’ with a table ‘getdataandwriteback’:
    (if not, please use ‘yoursqldb.sql’ attached to create the table within a database called ‘yoursqldb’)
  2. Add a new user to MySql (direct link to the right user interface on MySql)
    1. User name: admin
    2. Host name: localhost
    3. Password: admin
    4. Re-type: admin
    5. Privileges: Data, Structure & Administration
  3. Extract and Open “Tableaufans-WriteBack-2018.2.twbx.zip” with Tableau Desktop
  4. Drag and drop extension into the canvas and choose the one you copied into C:\Users\<USERNAME>\Documents\My Tableau Repository\Extensions
  5. Allow data access to the extension:
  6. Choose “Pipeline” as sheet to choose data selections from:
  7. Happy write back your data 😉




  • If the data doesn’t get written into the database make sure that you’ve got a user called “admin” in MySQL with password “admin” with the following permissions:
    • http://localhost:8888/phpmyadmin/server_privileges.php?db=&viewing_mode=server
    • http://localhost:8888/phpmyadmin/server_privileges.php?username=admin&hostname=localhost&dbname=&tablename=&routinename=
  • If you want to debug Tableau Extensions generally you might want to have a look the following 2:21 min tutorial

    Start Tableau Desktop (with Extension in Debug Mode).bat
  • If you’re having any troubles in getting the extension up and running please leave us a comment below.
Timo Tautenhahn
Über den Autor
Timo originally coded his own BI-application by making use of different JAVA libraries. He Worked for IBM as BI-specialist and BA-architect before he joined Tableau. Favorite subject: JavaScript API
  1. Timo Tautenhahn
    Timo Tautenhahn Reply

    Hey Tableaufans,
    I’ve just updated the tutorial. ! In the alpha version of Tableau’s Extensions I’ve been zipping my whole Xampp where the admin user did already exist. As this tutorial should work for everyone I’ve extended this post by describing how to create the admin user.

  2. Adrien Reply

    Hi Timo,

    We met a week ago and you showed us this capability. It is brilliant, I followed all the steps but at the moment, we use tableau 10.5. is there any limitation to use tableau extension? Which version do I need? if not, could you share the tableau workbook in previous version?

    thanks for your help

  3. Pingback: » Tableau Extension API – Write Back

  4. Sam Reply

    Hi Timo
    We use 10.5 as of now on my complany server but I have 2018 installed on my local machine,
    Would it be possible to install the writeback for me on my local machine with above steps ??

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Hey Sam,
      yes, if you’re using Tableau Desktop 2018.2 or above you can absolutely use it locally with the steps above! 😉

  5. Francisco Reply

    Hi Timo,

    Awesome post! Thanks for putting this together 🙂

    I have mySQL and WebServer installed remotely on a VM. Everything is set up. I modified the trex file by replacing ‘localhost’ with my VM’s IP address but I’m getting the following error when adding the extension:

    Unable to complete action
    Error parsing extension manifest :
    Error(10,66): value ‘’ does not match regular expression facet ‘[Hh][Tt][Tt][Pp][Ss]://.+|[Hh][Tt][Tt][Pp]://[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt]|[Hh][Tt][Tt][Pp]://[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt][:/].*’ (id: )

    I’m not sure how to solve this issue. Could you help me?

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Hey Francisco,
      Did the connection with the local My SQL work? Please ensure this first.

      Secondly try to ping the VM from the machine you‘re running the app on and make sure firewalls aren’t blocking you.

      Last but not least please ensure you‘re having the same database encoding I setup for this app.

      Please keep the community updated,

    • Matt Fette Reply

      Hi Francisco:

      We are having the same issue. Were you able to resolve your issue? If so, what was the cause.

      Thanks, Matt

  6. Matt Fette Reply

    Hi Timo:

    Very nice. Would you be able to modify it to use a SQL Server database rather than a MySQL database?

    Thanks, Matt

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Hi Matt,
      yes, absolutely! Simply navigate to the following folder C:/xampp/htdocs/Tableaufans-Commenting-Extension/php and find the ~writeBack.php file. If you‘ve installed the drivers for other databases simply change the connection here.

      You might need to install additional PHP libraries to establish the connection.

      Please let me know if this worked for you.


      • Matt Fette Reply

        Hi Timo:

        I altered your MySQL script to create the tables in a DB called yoursqldb in MS SQL Server. However, in the Tableaufans-WriteBack-2018.2 workbook, your data sources don’t match with the tables created by the script or the tables shown in your documentation.
        Workbook Data Sources:
        SuperstoreEurope (Only)

        Tables created by provided/attached MySQL script:

        Is there an update to the documentation or am I missing something?

        Thanks, Matt

  7. Matt Fette Reply

    Hi Timo:

    We have the figured out our issue with the data sources and that’s okay now. However, like Francisco above, we are in a VM environment and the database server is separate from the Tableau server:

    Unable to complete action
    Error parsing extension manifest :
    Error(10,128): value ‘http://1qvbidb01.ourcompany.com:8888/extensions-api-master/myExtensions/Tableaufans-WriteBack-2018.2/index.html’ does not match regular expression facet ‘[Hh][Tt][Tt][Pp][Ss]://.+|[Hh][Tt][Tt][Pp]://[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt]|[Hh][Tt][Tt][Pp]://[Ll][Oo][Cc][Aa][Ll][Hh][Oo][Ss][Tt][:/].*’ (id: )

    Any ideas?

    Thanks, Matt

    • Matt Fette Reply

      Hi Timo:

      We are able to add the extension without issue when using localhost in the .trex file. However, if we try to use the actual server name: 1qvbidb01, it keeps returning the same parsing error, both local on the 1qvbidb01 DB server and remote from the actual Tableau server. Is localhost hard wired in whatever is processing the .trex file? We would really love to be able to run this from our Tableau server.

      Thanks, Matt

      • Timo Tautenhahn
        Timo Tautenhahn Reply

        Hi Matt,
        I‘ve overseen that you‘re using http. All extensions must use HTTPS. Localhost is the only exception as it allows you to quickly test extensions locally.

        Maybe that’s causing the error. So please get your server a certificate so that it’s HTTPS ready.


        • Matt Fette Reply

          Hey Timo:

          That did the trick. We applied a public wildcard SSL certificate to the domain and changed the URL in the .trex file to https. We were then able to get it to work, but we were having mixed content issues where it was only showing secured content. We also had to modify the URLs for the two CDN subdomain URL’s (datatables.css and datatables.js) to use https rather than http in the index.html file. Once we did that, everything worked.

          We really appreciate all your help. Now it’s time to try and convert to SQL Server from MySQL, and potentially IIS from Apache.

          Thanks, Matt

          • Timo Tautenhahn
            Timo Tautenhahn

            Awesome! Glad to read this!

            Please keep us updated. Maybe you want to feed your modifications back to the great Tableau community. I‘m happy to let you create a „guest post“ so that Tableau fans globally can leverage your great work around MSSQL and IIS!


  8. Matt Fette Reply

    Will do.

  9. Pingback: tableaufans.com » Tableau Extension:  Writeback for SQL Server using Tableaufans.com’s MySQL Writeback as a Baseline

  10. Timo Tautenhahn
    Timo Tautenhahn Reply

    Hi Matt,
    Hi Tableau Fans,
    the one and only David Spezia just joined us on Tableaufans.com. In his first post he created a step-by-step guide on how to replace MySQL with Microsoft SQL Server for this Tableau Extension:


    Please let us know if this works fine for you.
    Thanks a lot,

  11. Matt Reply

    Hi Timo:

    I’m glad I checked the blog before starting on this. Sorry for taking so long getting back to it. Thanks David! We did pretty much what David did, but replaced Apache with IIS and installed a security certificate so we could move beyond the developer’s localhost environment:
    * Tableau requires that you have a certificate/https if you are using anything other than localhost.
    * Install the certificate.
    * Update the manifest/trex file with the https URL.
    * You will need to install the latest SQL Server-PHP drivers. You can use the Web Platform Installer in IIS to search for and install the latest drivers.
    * On the Tableau Server, log on as an administrator. Click on the ‘Settings’ link, then on the Extensions link. You can now update Tableau Server with the https URL for the extension. Set the Full Data Access dropdown to Allow and the User Prompts dropdown to Hide.


  12. Pingback: tableaufans.com » How to write back data to SAP HANA?

  13. Pingback: tableaufans.com » How to write back data to Microsoft SQL Server, MySQL or SAP HANA?



captcha *