Kim Hoang Nguyen is a data consultant and master builder of dashboards and visualizations at Inviso by Devoteam.
Have you ever been in a tiresome situation when working with large extracts in Tableau? Feeling that the battle against Tableau has taken its toll on you?
Imagine this: you are uploading a large extract from Desktop to Server, just to discover hours later that the server has timed out. Obviously, leaving you frustrated, on the verge of tears (we know you will not admit it)… Now you have to do the process all over again; however, this time knowing (and fearing!) that the server might do the same thing again. Not a pleasant feeling. If it indeed is one of those days, and the server have decided to make this day as bad as possible for you, we know you are crying this time (fear not – we have been there too).
If you can recognize the purposeful dramatic situation above, please go ahead: this blog post is for you. Read on to find out how to avoid situations like these and reclaim that precious time of yours where you can be happy ever after.
Make Tableau Server do the work, to make your work, work
When you are working with large extracts in Tableau and would like to upload the workbook with the extract to Tableau Server, the performance can be slow and time-consuming. It is a time-consuming affair because the extract is created on your desktop instead of being created by the often more powerful Tableau Server.
The following method is a workaround, where we let the server do the hard work of creating the extract instead of our desktop. We do so by uploading an empty extract and refresh it directly through the server. The extract is then populated with data from the server once it has been published.
This method is relevant in situations where you need to make a big extract. Possibly bigger than what your own computer can handle or have enough hard disk space for. In addition, you need to ensure that the server have access to the data source.
How to deliver the task to Tableau Server
The first step is to create a parameter we can use to toggle which extract we want:
The parameter allows the user to choose whether he or she wants to have the full or empty extract. I have chosen a Boolean parameter that returns True for “Empty extract” and False for “Full extract”.
Once the parameter is created, we show the parameter control for easy toggling between the options:
Ensure that “Empty” is chosen before proceeding to the next step.
We create a Calculated Field that equates the chosen type of extract:
Since *Chosen Extract* is a boolean variable, it can be used as a dimension to filter the extract data:
In the Extract Data-Filter configuration, the value “True” should be excluded. We need to ensure that the False-condition happens immediately.
The condition for the extract should look like this:
Once you hit the Extract-button, Tableau will create an extract with no data.
Time for Tableau Server to sweat
The trick to make the server do the extract for you, is to change the parameter from Empty to Full before publishing to server:
The forced False-condition will not apply on the published worksheet as we have changed the *Chosen Extract*-filter in the extract definition from True (empty extract) to False (full extract) . Thus, the filter we have created will no longer evaluate to True and the server will have to deal with the full dataset.
Once the worksheet is uploaded to Tableau Server, and you refresh the extract from there, it will begin to populate the data in full.
The desired outcome has now been achieved. You have succesfully managed to delegate one of your tasks to Tableau Server. A cheeky smile appears on your chin as you realize the scores for the 2nd leg have been settled:
*Tableau Server: 0 – You: 1.*