Tableau Writeback — Expertise & Environment Needed (Part I)
There’s been another long gap from my last blog. Year 2024 brought a change in my life: new company, new city, new projects and therefore new challenges. I learnt and delivered plenty of new concepts in analytics as my previous manager was always brimming with ideas.
One of the new “concepts” I learnt on the job and delivered was Tableau Writeback.
I first explored the free writeback apps available on Tableau. Very soon, realization seeped in that if a complex customized version is needed then either develop one from the start or outsource. Decision went with the former. Never worked with Tableau APIs before, the task ahead was daunting.
Nonetheless, started the search with notes available on Tableau website followed by a YouTube video of Keshia Rose. They were helpful but only to give me confidence that this is possible and how to begin. However, do go through the above mentioned video, it will provide you with a good starting point.
My biggest challenge and time-pit was to figure out how data exchange happens between Tableau and the application and between client-side and server-side pages of the application.
So, I have distilled my leanings into this 3-part series, to make it easier to grasp. This first part of the series will cover the expertise and the environment needed. The second part will cover the scenario where a single row is impacted. The third part will cover a scenario where multiple records are impacted, at the same time.
Snippets of code will be shared in Part-II and Part-III but do not copy the code as is. The proverb that even copying requires intelligence exists for a reason.
Let’s begin.
1. Know how to code.
First, the developer should know how to code. If one believes that it is like writing complex SQL statements, then you may want to revisit this idea. It’s not an unattainable goal but it will demand longer hours if there is no knowledge of coding. Knowing how to code will reduce the task enormity by 20% approximately. This will leave the developer to explore the main part of the challenge which is to figure out what goes in building the writeback. Of course, do not underestimate the effort of writing the code, followed by debugging with intermittent periods of frustrations due to code failure before success comes along. One can look towards ChatGPT. However, a small warning: ChatGPT is as good as your knowledge on the subject. One needs to know what to ask and how to ask. Fortunately, coding was not new to me. But since this was my first coding project after decades, it was not a cake walk for me as well.
2. Decide the technology.
Then came the task of selecting the technology to build the writeback. There are plenty of choices to select from for e.g.: Glitch, Python, Node.JS. But this is a very case specific decision. It depends on what aspect of the project is a priority. For us, data security was paramount, and data was supposed to remain within the organization’s ecosystem hence Glitch or Streamlit were out of the race. Speed was the second concern. The end-user should not have to wait endlessly for the SQL action like inserts or updates on multiple records to complete, before moving on to the next action. Here clearly, Node.JS was the winner.
3. Set up the environment.
Once the technology to be used is decided, now is the time to set up the environment for the same. This is not my forte and I can only pen down what I did or helped with. It’s imperative that a systems administrator is available if one is not well versed with the environment setup knowledge. The setup requires right hardware, operating system, and web server configuration. My preference for Node.JS was Visual Studio. Once the environment is set up then there is a need to define the project type. The project type that suited us better was Blank Node.JS web application. This leads to creation of a workspace. But do keep in mind, project type selection in Visual Studio can be confusing due to too many options. Hence, choose wisely. Then comes the task of loading libraries and packages in the project workspace created.
A little warning here that the developer must install certain libraries and packages for the code to work seamlessly. My experience is limited but after a lot of trial and error it was clear that there is a need to install relevant database packages (for example, Oracle/My SQL), EJS, Express, Dotenv, and Eslint packages. With this, you are ready to start defining the structure for writeback within the project workspace.
See you in the next part of this series.
