Setting up Tableau Extension on MongoDB

Tableau is undoubtedly one of the leading analytics platform out there in market. Gartner says the same.

Gartner Report

Q2 2018 Tableau introduced a new Extensions API that enables developers to drag and drop third party functionality directly on the dashboard opening up endless possibilities for developers to bring creative stuff to the table.

Extension Object on Tableau 2018.2

It is pretty obvious that Tableau can read data from almost any database but writing back into the database was not even a thing until now.

I am going to walk you through developing write back extension to MongoDB using Extensions API.

An extension is essentially a web application that can be embedded in tableau dashboard and create , interact with other vizs on the dashboard.

Tableau Extension API architecture

The one thing that differentiates an extension with a web application is a configuration .trex file.

.trex

.trex is essentially a xml file of the extension built. It is the connection point to Tableau to talk to any data source through extension API

To make this post more focused on Tableau extension I would not be discussing how to develop a web application but you can follow this awesome tutorial by Travesy. It is a simple CRUD app using Node.js and MongoDB. You can stop at part 6 of the tutorial series and continue below.

By the end of part 6 from Travesy tutorial you should be able to run a service listening to port 3000. This is a simple web form which writes data into MongoDB

http://localhost:3000/articles/add

Using the official tableau .trex template create a file (mongoDBExtension.trex) with .trex extension and save it in folder location.

Open the file in an editor and replace the <source-location> tag with the following

<source-location>

<url>http://localhost:3000/articles/add</url>

</source-location>

Thats it! You extension is ready to use.

Lets use this MongoDB extension in Tableau Dashboard. Open a dashboard where you wanted to use this extension, drag and drop the object.(Extension objects are only available in Tableau 2018.2)

Extension Object in Tableau Desktop 2018.2

Dragging and dropping the extension object opens up a prompt where you can select “My Selection”. (You can explore “Extension Gallery” for some awesome pre built extensions)

Select “My Extensions”

Navigate through the folder location where you saved the extension .trex file

Ta Da! Your MongoDB extension is now embedded into your dashboard.

MongoDB extension on Tableau Desktop 2018.2

P. S: This is a very basic tableau extension where you can write back to Database right from the Dashboard. HMU if you have any questions.

Learner, thinker and Doer.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store