DoingData

View Original

A Beginner's Guide to Tableau SDK - An Introduction

Hey there! Good to see you. Looking for a tutorial on Tableau SDK? You've come to the right place. Tableau SDK is a set of functions that can be called from within C, C++, Java or Python to create tableau extracts and publishing them on tableau server.

Note: this series is limited to the scope of Tableau SDK for Python. But you will benefit reading even if you are using a language other than Python.

Advantage of Tableau SDK

But what's so exciting about it? A lot, actually. For example, you can take data from anywhere, clean it up using any of above mentioned four programming languages, manipulate, do some advance analytics and export the data to a tde file that can be directly read by Tableau Desktop or be shared on Tableau Server for further visualization.

I particularly became excited with the idea that I can import a dataset in Python and use powerful machine learning libraries of python to predict some outcomes. Once I am done with the predictive model, I can export the model into a data extract using Tableau SDK and publish it directly to Tableau Server where the results can be visualized and shared with audiences.

A huge advantage of this approach is that a predictive model and data visualization can live totally separately and can be modified without affecting each other if the need arises.

Another good use case is social media analytics where you can connect to social media platforms via APIs to collect, clean and process data using Python or other languages and publish them to Tableau Server via extract API of Tableau SDK (more on that later). You can keep adding new data on defined intervals as the new data comes on social media platforms.

Requirement & Support

Operating System: Tableau SDK works on Linux, Windows and Mac OS X. For Mac OS X, it works on 10.9 and later versions.

Programming Language: Tableau SDK can be implemented using any of four languages from C, C++, Java and Python. In case of Python, Tableau SDK only supports Python 2 and doesn't work with Python 3. So if you have Python 3, you will need to install Python 2 to be able to use Tableau SDK libraries.

Tableau Server: Also, if along with creating tableau extracts, you are also going to publish them to Tableau Server, your Tableau Server instance should be Tableau Server 9.0 or later.

Components

Tableau SDK has two components as follows

Extract API: Extract API lets you create a data extract file (tde) using any data set that may directly not be supported to be read by Tableau. Example: You can scrape websites using Python and then convert the scraped data into a tde file using Extract API. Please note, Extract API was earlier known as TDE API.

Server API: Server API is used to created extracts to publish to a Tableau Server. Please note, in versions earlier to 9.1, there was no Server API and we could not publish extracts to server using Tableau SDK.

See It in Action

Want to see Tableau SDK in action? Awesome. Let's create our first extract. Click Here to read, how.

See this gallery in the original post