Business Intelligence Blog

Latest Stories

Featured Stories

Filter By Categories
Ashleigh Trinh
By
October 17, 2018

Promatix | Tableau Web Data Connectors

A few months ago, I had an attempt at developing a Tableau Web Data Connector (WDC). A Tableau WDC is a way of connecting to a web data source if there is no existing connection available in Tableau. Tableau provides documentation for their WDC which has all the download instructions and tutorials with an example to make a start to develop your own WDC.

 

The original plan was to develop a WDC to link to the Xero API to be able to easily access finance information. However, this did not go to plan, it was much more complex than I anticipated since the Xero API requires authorisation and logins to access the data which I was not able to easily incorporate into the example code given by Tableau. After a few failed attempts and reading Géraldine Zanolli’s post on her experience with WDCs, I decided to start with an easier API. I decided to use the Swapi, Star Wars API (as mentioned on her post) not knowing how vast the API universe was but there are many APIs in existence for many wonderful and weird genres of data.

 

One of the most important parts is to read the documentation for the API. It is very easy to think of the documentation for a program as instructions for a new gadget. Optional. But for the WDC to work, there are parts that are important to know, such as the base URL required to get the data, the endpoints, and the data’s schema. Those three are, in my opinion, the bare minimum must-read sections of documentation to edit the example code.

 

My first WDC took me a good fortnight to finish. It took me a while since I wanted to add some additional functionality to the WDC where you can select the type of data the user wants. In this example, I wanted the user to have the opportunity to select different genres of data such as planets or starships in the Star Wars universe. Though a basic WDC should not take that long and is much simpler.

 

ezgif.com-gif-maker

 

After struggling with developing the WDC, I realised that more knowledge is required to build applications such as a WDC. I took a Web Applications for Everybody course by the University of Michigan on Coursera. The course was good to give me a better understanding how the processes work between the browser, the web server and the database server. The content itself is not about WDCs since that is specifically a Tableau application but it helps to build an understanding of what some of the code does in the grand scheme of pulling data from different sources.

 

The Coursera course worked great for me, I had some time in August and the specialisation consisted of four courses which was perfect to fit into just the month. I set myself the aim to finish it in one month which gave me a week for each course but the first two were more basic, and I have already done training with SQL which meant that I could finish sooner and spend more time on the latter two courses: Building Database Applications in PHP and JavaScript, jQuery, and JSON. The last two courses were especially hands-on and required you to build a web application which can get data from a database server, add new data into the server, and edit data that is already in that server.

 

I found the assignments to be an extremely useful part of the learning process, it made me think about what my code would result in and forced me to consider different approaches. For example, when editing an entry in the database via the web application, it is important to make sure that no entries are repeated. This is especially important when the data in your form goes to multiple different databases, hence it is better to delete all the data for that one entry and then ‘updating’ it by adding all the old fields and the new edited fields so there are no duplicates.

 

I would certainly recommend Coursera and the Specialisation I took, it is a great format to learn something new or consolidate what you already know in your own time and space and at a fraction of the cost of attending a course in person. There are also forums every week so that if you have an issue you can ask someone, though keep in mind that many of the courses are based in other countries/continents so for instance, requiring urgent help at noon in the UK would make it 4am in Seattle. Other than that, it is great that there are videos and assignments which help you apply what you’ve learnt.

 

Recently, Data + Women have planned a ‘Hack the Data’ series (in London) which explains and demonstrates what an API is, how to scrape data from the web and how to develop WDCs and Tableau dashboard extensions for beginners. The sessions are free and the next one will be on how to create a Tableau dashboard extension, there is no current date yet but clicking on the link above will send you to their Meetup page where you will get all updates for the next session(s). Also, if you want to see what was shared in previous sessions there will be slides and documents shared on their Meetup page.

Subscribe Email