Tableau Real Time Data Streaming: 2 Easy Methods

on BI Tool, Data Integration, Data Warehouse • February 3rd, 2021 • Write for Hevo

Tableau Real-time Data Streaming

Do you wish to perform an in-depth real time analysis of your business data and require Tableau Real Time Data Streaming? If yes, then you’ve come to the right place. Businesses that are using Tableau will want to move data from all their data sources like the cloud and relational database management systems into Tableau for analysis. To ensure that companies draw insights from up-to-date data rather than from outdated data, there is a need for a system that allows Tableau Real Time Data Streaming. This article will show you 2 easy ways of how you can set up Real Time Data Streaming in Tableau for your analysis requirements.

Table of Contents

Introduction to Tableau

Tableau real time data streaming: logo
Image Source: www.tableau.com

Tableau is a software that is used for data visualization and business intelligence. It can help you extract insights from the data generated in your company. Tableau is easy to install and learn and also provides its users with a simple interface. 

Typically, your company data will be stored in the cloud, relational database management systems, and other types of storage systems. To perform an in-depth analysis, data will first have to be transferred from all data sources and imported into Tableau. The good thing with Tableau is that you can connect it to a lot of different data sources. It is after establishing a connection that you can transfer data as per your requirements.

Various features of Tableau are as follows:

  • Integrated tools that can be used to visualize your data. 
  • Integration of different views that can be used to present data.
  • Allows users to apply filters/formatting/drill-downs, create sets, groups, generate trend lines, and perform forecasting.

When you open Tableau Desktop, you will be taken to the home screen, which looks as follows:

Tableau real time data streaming: Tableau Desktop Home Page
Image Source: Self

The navigation panel on the left side of the screen shows different data sources Tableau can import data from. You can choose to connect to a Tableau Server, a file, a server, or saved data sources as shown below:

Tableau real time data streaming: Connect to Tableau
Image Source: Self

The central part of the screen shows your workbooks. To open a new workbook, just click the “Open a Workbook” option as shown below:

Tableau real time data streaming: Open Existing Workbook
Image Source: Self

The bottom of the screen shows some sample workbooks. You can open each of them and see how a sample Tableau workbook looks like. You will also get an idea about the kind of data that you should add to your Tableau workbooks. 

The right side of the window shows the “Training and Resource” sections. The training section shows several resources that can help you get started with Tableau. In the resources section, you can find links to the Tableau community forum and sample data. 

You can find more information on Tableau here.

Ways of Setting Up Tableau Real Time Data Streaming

Method 1: Using Custom Code Snippets to Set Up Tableau Real Time Data Streaming

This method involves writing code or scripts that can automate the process of refreshing the data source.

Method 2: Using Hevo Data for Setting Up Tableau Real Time Data Streaming

Hevo is a No-code Data Pipeline. It can load the data from 100+ data sources into Tableau without writing any line of code.

Get started with hevo for free

Pre-requisites

  • Tableau Desktop Account.
  • Tableau Server Account.

Methods to Set up Tableau Real Time Data Streaming

Tableau Real Time Data Streaming is a way to ensure that companies extract insights from up-to-date data in order to make the right business decisions. It can be set up using the 2 following methods:

Download the Guide on Data Streaming
Download the Guide on Data Streaming
Download the Guide on Data Streaming
Learn how you can enable real-time analytics with a Modern Data Stack

Method 1: Using Custom Code Snippets to Set Up Tableau Real Time Data Streaming

Tableau is not a natively live streaming tool. So, if you want to perform Tableau Real Time Data Streaming, you have to write a script or code that will perform the required operations for you. In real time streaming, the data is supposed to be refreshed without the involvement of the user.

In most connections to Tableau, you refresh the data in your desktop by right-clicking the data connection and choosing “Refresh”. You can also use the menus where you’ll find the refresh option.

Refresh data source regularly to set up Tableau real time data streaming
Image Source: Self

The easiest way to refresh your data source is by clicking the F5 key on the keyboard. If you’re using Tableau Server, you can refresh the data source by clicking the refresh icon located at the top of the view. 

Tableau Desktop Auto-Refresh

If you’re using Tableau Desktop to set up Tableau Real Time Data Streaming and you want to refresh your data after every 5 minutes, first download and install an open-source utility called AutoHotKeys from here.

You can then use the following script:

#NoEnv; Recommended for future AutoHotkey releases.
; #Warn; Enable warnings to assist with detecting common errors.
SendMode Input; Recommended for new scripts 
SetWorkingDir %A_ScriptDir%; Ensures a consistent starting directory.

#Persistent
SetTimer, PressTheKey, 300000
Return

PressTheKey:
Send, {F5}
Return

Tableau Server Auto-Refresh

If you’re using the Tableau Server, you can use the Tableau JavaScript API to set up Tableau Real Time Data Streaming. The following JavaScript API will refresh your Tableau Server data after every 3 seconds. 

Note that it cannot work on Tableau Desktop.

<!DOCTYPE html>
<html lang=“en”>
<head>
<title>Tableau JavaScript API</title>
<script type= “text/javascript” src=“https://online.tableausoftware.com/javascripts/api/tableau_v8.js”></script>
</head>
<body>
<div id=“tableauViz”></div>

<script type=‘text/javascript’>
var placeholderDiv = document.getElementById(“tableauViz”);
var url = “https://online.tableausoftware.com/t/nicwallworktableauonline/views/AutoRefreshTest/Dashboard1”;
var options = {
hideTabs: true,
width: “100%”,
height: “1000px”
};
var viz = new tableauSoftware.Viz(placeholderDiv, url, options);

setInterval(function () {viz.refreshDataAsync() }, 3000);

</script>
</body>
</html>

The value of the URL variable has to be replaced with the URL of your Tableau workspace. If you want the refreshing to be done after every 5 minutes, replace the 3000 in the fourth line from the bottom with 300,000. 

This is the best solution provided you have a quick data connection.

Limitations of Using Custom Code Snippets to Set Up Real Time Data Streaming in Tableau

Although it is possible to achieve Tableau Real Time Data Streaming with the above approach, you will encounter the following challenges:

  • Coding experience and knowledge of JavaScript is required. This means it’s not the right approach for non-programmers. 
  • It may not work well in cases of a slow data connection.

Method 2: Using Hevo Data for Setting Up Tableau Real Time Data Streaming

Tableau real time data streaming: Hevo Logo
Image Source: Self

Hevo is a No-code Data Pipeline. It supports pre-built data integrations from 100+ data sources. Hevo offers a fully managed solution for your fully automated pipeline to set up Tableau Real Time Data Streaming and will let you directly load data to Tableau from all your data sources. It will automate your data flow in minutes without writing any line of code. Its fault-tolerant architecture makes sure that your data is secure and consistent. Hevo provides you with a truly efficient and fully-automated solution to manage data in real-time and always have analysis-ready data at Tableau.

Hevo focuses on three simple steps to get you started

  • Connect: Connect Hevo with all your data sources by simply logging in with your credentials.
  • Integrate: Consolidate your data from several sources in Hevo’s Managed Data Integration Platform and automatically transform it into an analysis-ready form.
  • Visualize: Connect Hevo with your desired BI tool such as Tableau and easily visualize your data to gain better insights.
Sign up here for a 14-day free trial!

As can be seen, you are simply required to enter the corresponding credentials to implement this fully automated data pipeline without using any code and set up Tableau Real Time Data Streaming.

Let’s look at some salient features of Hevo

  • Fully Managed: It requires no management and maintenance as Hevo is a fully automated platform.
  • Data Transformation: It provides a simple interface to perfect, modify, and enrich the data you want to transfer. 
  • Real-Time: Hevo offers real time data migration. So, your data is always ready for analysis.
  • Schema Management: Hevo can automatically detect the schema of the incoming data and map it to the destination schema.
  • Live Monitoring: Advanced monitoring gives you a one-stop view to watch all the activities that occur within pipelines.
  • Live Support: Hevo team is available round the clock to extend exceptional support to its customers through chat, email, and support calls.
visit our website to explore hevo

Conclusion

This article shows the implementation of 2 easy methods that can help you in setting up Tableau Real-Time Data Streaming The process can either be implemented using Tableau which is not natively a live data streaming tool and hence would require some form of code to automate the process or it can be automated using Hevo.

Hevo provides a No-Code Data Pipeline that allows accurate and real-time replication of data from 100+ sources of data. Give Hevo a try and sign up for a 14-day free trial today.

Visualize your Data in Tableau in Real-Time