26
SEP
2019

Write Back Extensions – 3 in 1 Quickstart

Tags :
Kommentare : 19

In this blog post you can get all 3 Tableau Write Back Extensions as part of a larger demo asset – a Tableau Server Site which demonstrates all kinds of cool things on the Tableau Platform. Nevertheless people are regularly asking how to just quickly demonstrate how Tableau Write Back capabilities can look like. So this blog post is just about how to get the 3 Tableau Workbooks from above which include (Write Back Extensions) up and running as fast as possible?!

How can I get it?

Demo

Demo

System Requirements:

  • Windows operating system
  • Port 8888  needs to be open/free (Webserver)
  • Port 3306 needs to be open/free (MySQL)
  • Tableau Server 2018.3 or above

 

 

Step-by-Step Installation

Step-by-Step Installation

    1. Download this customized XAMPP 
      • Port 8888  needs to be open & free (Webserver)
      • Port 3306 needs to be open & free (MySQL)
    2. Extract it into C:
    3. Start the xampp_start.exe within C:\xampp-tableaufans
    4. Download and open the Tableau Workbooks
    5. Database password is “admin

Troubleshooting

  • Troubleshooting

    • Port 8888  is already in use before starting Xampp
      (Change the port)
    • Port 3306 is already in use before starting Xampp
      (Change the port)
    • You’re using an older Tableau Version than 2018.3.x
      • Download and install Tableau Desktop 2018.3.x or above
      • Open up the workbooks from step 4
      • Go to File > Export As and select the version that you want to downgrade to  
      • Keep in mind that the version needs to support Tableau Extensions. Therefore 2018.2 or above is required

     

    • If it’s still not working see how you can debug Tableau Extensions generally

      Files from the Video:
      1. Download Chromium
      2. Start Tableau Desktop 2018.3 (with Extension in Debug Mode)

FYI

P.S. Database User/Password are both “admin/admin” for all examples where workbooks leverage the MySQL database on Xampp you’ve been downloading above. You can have a look at the tables being used via http://localhost:8888/phpmyadmin/db_structure.php?server=1&db=tableaufans

 

 

Please let us know if this has been helpful and what kind of scenarios you’re looking forward to solve with it.

 

 

 

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. Pingback: tableaufans.com » Tableau Write Back Extensions

  2. Pingback: tableaufans.com » Tableau Extension API – Write Back – Source Code

  3. Pingback: tableaufans.com » Tableau Extension API – Write Back – Updated Source Code for Tableau 2018.2

  4. Avatar
    Omar Reply

    Hello Timo,

    Appreciate this documentation and walkthrough for the writeback extension! I’m looking to set up this extension to write back to MS SQL or Teradata. Are there any possible negative consequences are setting up part of this writeback extension, other than a warning that something was set up wrong (eg. database corruption, etc)?

    Omar

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Hi Omar,
      you’re welcome and please feel free to adjust it to your own needs!!! You can absolutely adjust the Extensions to write data back to your backend of choice! I unified/adjusted the original table names a little bit for this blog post, but for MSSQL you can have a look at the steps necessary in this post “Write back to MSSQL Server

  5. Avatar
    Benoit Reply

    Hello Timo,

    Thank you very much for your work!
    I am looking to write back data to an Excel spreadsheet (locally hosted).
    Would it be possible to use the Write Back extension to do so? I guess it should be pretty simple but I can’t find a way.

    Best Regard,

    Benoit

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Hi Benoit,
      that is absolutely possible. You could adjust the “writeToDb.php” file within htdocs\extensions-api-master\myExtensions\Tableaufans--Extension\php. One library I just found within my first Google result was the following one: https://github.com/PHPOffice/PhpSpreadsheet. Please feel free to choose from many others out there. It would be awesome if you could keep the community posted about your approach! 😉

      • Avatar
        Benoit Reply

        Thank you very much for your informative (and quick) answer, I will try that and keep you posted!

      • Avatar
        Alex Leung Reply

        HI Timo,

        I am having trouble changing the “writeToDb.php”.

        Please can you give further guidance on it?

        Thank you.

        • Timo Tautenhahn
          Timo Tautenhahn Reply

          Hi Alex,
          what kind of trouble do you have?

  6. Avatar
    Max Henrion Reply

    Timo, these write-backs look great! Would you be available for some consulting to assist us with a modification to the extension? If not, can you suggest someone else?
    Thanks
    Max

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Max, I can highly advise you to reach out to a Tableau partner for this type of customization. Check out this list and find one in your region. You can also reach out to your Tableau seller directly so that he can help you find one.

  7. Avatar
    FT Reply

    Hi Timo,

    I have some problems when i open the extension in 2019.2 it crashes…
    When i look at the xampp in the embedding there is no writeback folder..
    If i open http://localhost:8888/TableaufansDemoOverview/ and click on writeback i get url like this but there nothing there: http://localhost/t/tableaufans/views/TableaufansWriteBackExtension/WriteBack
    Need a update i think?

    Best

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Hi FT,

      The workbooks within the demo are created with 2019.3. Attached you find one of it as v2019.1 workbook in order to be able to test it: DOWNLOAD If it works I’m happy to provide you with the other workbooks, too since this is very easy to achieve.

      The write back code is located deeper in the folder structure: “xampp-tableaufans\htdocs\extensions-api-master\myExtensions\Tableaufans-WriteBack-Extension\php\writeToDb.php”

      The XAMPP for this blog post is just being used to host the database + webserver. Therefore don’t open up the browser, but open up the workbooks instead. (I’ve been updating the XAMPP anyway to make this page not even appear for this asset anymore)

      The link works if you setup this site on your local Tableau Server

      Cheers,
      Timo

  8. Avatar
    Simone Magagnini Reply

    This is awesome but it doesnt work…perhaps the issues with the IT ppl 🙁

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Hey Simone, What exactly is not working?

  9. Avatar
    Anuj Reply

    Hey Timo, this wsa working earlier and now it seems to stop working.. its not doing anything after you select the Mark.
    i tried debugging but didnt make much headway. i even download a fresh copy from the web and saw the same thing..
    function loadSelectedMarks
    console.log(“worksheetName:” + worksheet.name );
    // Call to get the selected marks for our sheet
    worksheet.getSelectedMarksAsync().then(function (marks) {
    // Get the first DataTable for our selected marks (usually there is just one)
    const worksheetData = marks.data[0];
    // console.log(“in loadSelectedMarks”);
    //console.log(“worksheetData :” + worksheetData);
    // console.log(“totalRowCount :” + marks.data[0].totalRowCount);

    // Map our data into the format which the data table component expects it
    const data = worksheetData.data.map(function (row, index) {
    const rowData = row.map(function (cell) {
    //selected marks per row and index (= column)
    return cell.formattedValue;
    });
    console.log(“rowData:” + rowData);
    print(“rowData:” + rowData);

    it doesnt print any data in the console log

  10. Avatar
    Wannie W Reply

    Hi Timo,
    Thank you for sharing such an awesome tool!
    Is there any way for the extension to connect to Oracle Database instead of MySQL? If so, what are the configuration changes?

    • Timo Tautenhahn
      Timo Tautenhahn Reply

      Hi Wannie,
      thank you very much for your feedback and you’re welcome! 😉

      Absolutely! Just look at the following posts which describe what you need to adjust to write data to MS SQL, SAP HANA or Snowflake and make similiar adjustments to write data back to Oracle.

      Snowflake
      MS SQL
      SAP HANA

      If you want to contribute your work back to the community I’m happy to let you post about it once you’ve successfully set it up.

Kommentare

*

captcha *