Tableau Prep Builder
Tableau Prep Builder was introduced with version 2018.1 of Tableau Desktop, but what can we use Tableau Prep Builder (henceforth referred to in this chapter as Prep) for? The core purpose of the tool is data preparation. The good news is, Prep is fully compatible with Tableau Desktop, and also with Tableau Server. That means you can execute jobs in Prep to clean your data with the click of a button. Additionally, Prep is as visual as its big brother, Tableau Desktop, meaning that you can see every step of data preparation in a fully visual format.
Therefore, let's dive into the Graphical User Interface (GUI) and be amazed by another high-end product, which will allow you to get initial data insights, enabling you to decide faster if your dataset is worth analysis. Prep will pave the way for an even smoother Tableau Desktop experience.
In this chapter, the following topics will be discussed:
- Connecting to data
- The Tableau Prep Builder...
Connecting to data
If you are familiar with Tableau Desktop, Tableau Prep Builder will be an easy game for you. The handling and interfaces are very similar, and connecting to data, if the connector is available in Prep, works all the same whether it's a text file, a database, or an extract. At first sight, you might not even notice a difference between the Tableau Prep Builder the Tableau Desktop GUIs, which provides the handy advantage that you can start prepping right away.
Figure 3.1: Tableau Prep Builder
From here, click on the + in order to open a file. After doing so, the following screen will appear:
Figure 3.2: Connecting to data
From the preceding screenshot, we can see that you can choose the type of data you want to connect to in the search bar. Just as in Tableau, the repertoire of Tableau Prep Builder includes multiple databases.
Now let's connect to a dataset with a practical...
The Tableau Prep Builder GUI
User experience is an important topic, not only when you build a dashboard but also when you use other aspects of Tableau. One of the biggest selling points of Tableau is and has always been the ease of using the GUI, and is only one of the reasons Tableau is a much-loved tool by its customers.
The Tableau Prep Builder GUI has two important canvases to look at. Right after you have connected data to Tableau Prep Builder, the workspace will split into several parts:
Figure 3.4: Prep workspace sections
- A: The connection pane, showing you the input files available at the location selected.
- B: The flow pane, which shows your current Prep flow. This always starts with an input step.
- C: The input pane settings, which give you several options to configure your input.
- D: The input pane samples, showing the fields you moved to the connection pane, including...
Tableau Prep Builder comes with lots of different features. Sometimes you might use many different tools to prepare your dataset in order to get it in a shape you desire. Other times you might just run an aggregation (one feature) and be done. It really depends on the dataset itself and the expected output. The fact is, the closer your Prep output data is to what you need for your Tableau Desktop visualization, the more efficiently VizQL will run on Tableau Desktop. Fewer queries in Tableau Desktop means faster generation of dashboards.
To me, the best part about Tableau Prep Builder is that it can handle a huge amount of data. Sometimes I even use it for datasets I don't want to visualize in Tableau Desktop, just to get a quick overview of, for example, how many rows contain a specific word, how many columns are needed, what happens to the date range if I filter a particular value, and so on! Within a few minutes I have insights that would have taken me much...
Additional options with Tableau Prep Builder
This section will discuss some smaller stand-alone but very powerful features. Some of you might have been using Prep already since the very first release. With each release and each additional user and given feedback, Tableau was able to create a priority list of features that stakeholders—like you and I—really wished to see. The upcoming topics are some of the best examples. None of these features were present in the initial release but have made the product so much better, more valuable, and more complete. You are able now to save part of your flow and reuse it, write back your data to an external database, refresh parts of your dataset, and schedule flows with the Tableau Data Management add-on. Let's take a closer look and start with the 'insert flow' in flow function.
- If you want a flow to run according to a schedule or save it to a location, it's best to use Add | Output:
Figure 3.54: Output
- After you do this, the following screen will appear:
Figure 3.55: Save to file
- The user now has the option to save the data to a file, and also to save it in Hyper file format as
.xlsx(new in Tableau 2021.1), or as a
- Another option is to publish the newly generated data source directly to Tableau Server and make it available for other users. For this option, select Publish as a data source instead of Save to File from the dropdown.
- A third option to save Prep output was been added in Tableau 2020.3: writing the resulting data to an external database. If you want to do so...
We started this chapter with an introduction to Tableau Prep Builder. We looked at the GUI and how we can connect data to it. After that, we did some exercises regarding data preparation. This can be divided into five parts: data cleaning, unions and joins, aggregating, pivoting, and scripting. We also considered several additional options to improve the usefulness of your data, including inserting steps from other flows, and incremental refreshes. To round out this chapter on Tableau Prep Builder, we looked at exporting data. Here, we saw that the new dataset can be saved as a file or data extract, written back to an external database, or pushed directly to Tableau Server.
Just like Tableau Desktop, Tableau Prep Builder is very much self-explanatory and highly visual. Colors, symbols, and highlights make it easy to get used to this extract, transform, and load tool, which is invaluable for preparing your data before manipulating it on the main Tableau interface!