HOW TO RESOLVE THE DATA REFRESH ISSUE IN TABLEAU DESKTOP VIEWS AND DASHBOARDS
We work with many companies using Tableau for their analytical requirement and even those with advanced product knowledge are still frequently asking the following question related to data refreshing in views or dashboards. “Why am I not able to refresh my Tableau Desktop Views and Dashboards?”
To get more detailed:
“With a ‘Live connection’, when any changes are made in the data sources, the views or dashboards do not reflect the changes after refreshing. Even if the workbook is closed and reopened, the changes from the data sources are not reflected. The users have to always select the ‘Edit Connection’ option, select the source file and only after that the refresh takes place”
“With a Tableau Data Extract (TDE) enabled, when the “Extract refresh” option is selected, the TDE file does not refresh to capture the changes in the data sources. The result is the same even when the workbook is closed and reopened. To solve this problem, the users have to always select the ‘Edit Connection’ option and select the source file again, and then perform the refresh.”
If we look at the above scenario from the user’s perspective, it is clear they are simply following the basics. They are instinctively selecting the right options but are not getting the desired output. It is understanding that this is very frustrating.
I decided to troubleshoot the problem and were able to find the solution for everybody.
How to Resolve the Data Refresh Issue in Tableau Desktop Views and Dashboards
Finding the Problem:
Saving your Tableau Work
There are several ways to save your files in Tableau desktop, with “Tableau Workbook (TWB)” and “Tableau Packaged Workbook (TWBX)” being the most common.
Let=’us take a quick look at the definition of these file types.
- Tableau Workbook (TWB): A TWB contains information about the data source, the sheets, dashboards, and stories without the data.
- Tableau Packaged Workbook (TWBX): A TWBX takes the original TWB and also the copy of the data from the data sources that the TWB connects to, and packages it together. That’s why it is called as the packaged workbook.
For this post, I will highlight a basic and very important aspect of the TWBX files, which is either not known or ignored by the Tableau users. This aspect is the main culprit of the data refresh issues being discussed.
So, for everyone who has reported the problem of refreshing as mentioned above, and had saved their work as “packaged workbook”, let’s take a look at what went wrong and why you were not able to refresh your dashboards
Where does the TWBX get the copy of data from?
When a workbook has a live connection to a file-based data source, such as CSV/text files, Excel files, and statistical files etc., Tableau Desktop creates the copy of the source file directly under the packaged workbook.
If the workbook has a live connection to a database, it is mandatory to first create a tableau data extract (TDE). While saving the file as the packaged workbook, Tableau Desktop creates the copy of this TDE file under the packaged workbook.
Irrespective of any data source being connected to, if a data extract is enabled, the copy of this TDE file will be saved under the packaged workbook.
In all the cases above the packaged workbook is a single file which contains all the necessary information.
What happens when a packaged workbook is opened in Tableau Desktop?
When a TWBX file is opened in Tableau Desktop, the copy of the data stored under the TWBX file (either the source file or the TDE file) is extracted and saved temporarily under the predefined TEMP folder on the machine where Tableau Desktop is running. This file under the temp folder becomes the source for the tableau workbook as long as the workbook is open. The data required for the sheets and dashboards is fetched from this source file under the temp folder.
At this point, the original source file or the database remains isolated and disconnected from the Tableau workbook. This can be verified by selecting the data source’s “edit connection” option and checking the path where the source data is being referred from. This path belongs to the temp folder mentioned above.
If we refresh the connection or refresh the data extract file, the Tableau workbook always points to the file under the temp folder and not the original source file. Hence making any changes in the original source data will have no effect on the Tableau workbook.
In order to capture the changes from the original source file, within a packaged workbook, through a live connection or Tableau data extract, one has to always follow the process below:
- Edit the connection of the packaged workbook and point it to the original source file
- With a live connection, Tableau will automatically refresh the views with the new data source
- With a TDE enabled, select the refresh extract which will regenerate the TDE file with the data from the original source. This TDE file will also be created under the temp folder.
- Save the packaged workbook. This will ensure that a fresh copy of the original source file or the data extract file from the temp folder will be saved under the packaged workbook.
An alternate solution is to save the files as Tableau workbook. This will eliminate all confusions since we will not be dealing with multiple copies of the data source.
So there it is, a simple 4 step process for ensuring your dashboards and views are refreshed when you need them.
About the Author: Sourabh Dasgupta
Sourabh Dasgupta is based in Pune, India, and has been associated with Corporate Renaissance Group India for the past 17 years and is currently heading the Tableau Training & Consulting Services at CRG
He is a professional Tableau Software Trainer, accredited by Tableau & has been delivering training on Tableau Desktop and Tableau Server, across India, Mongolia, and Singapore. He is a Tableau Desktop 9 Qualified Associate and Tableau Server 8 Qualified Associate.
If you wish to accelerate your skills and empower the learning with hands-on education or are seeking an Expert-on-Demand, reach out to Sourabh at firstname.lastname@example.org