Mastering Tableau 2021 - Third Edition

4 (1 reviews total)
By Marleen Meier , David Baldwin
    Advance your knowledge in tech with a Packt subscription

  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. All About Data – Getting Your Data Ready

About this book

Tableau is one of the leading business intelligence (BI) tools used to solve data analysis challenges. With this book, you will master Tableau's features and offerings in various paradigms of the BI domain.

Updated with fresh topics including Quick Level of Detail expressions, the newest Tableau Server features, Einstein Discovery, and more, this book covers essential Tableau concepts and advanced functionalities. Leveraging Tableau Hyper files and using Prep Builder, you’ll be able to perform data preparation and handling easily. You’ll gear up to perform complex joins, spatial joins, unions, and data blending tasks using practical examples. Following this, you’ll learn how to execute data densification and further explore expert-level examples to help you with calculations, mapping, and visual design using Tableau extensions. You’ll also learn about improving dashboard performance, connecting to Tableau Server and understanding data visualization with examples. Finally, you’ll cover advanced use cases such as self-service analysis, time series analysis, and geo-spatial analysis, and connect Tableau to Python and R to implement programming functionalities within Tableau.

By the end of this Tableau book, you’ll have mastered the advanced offerings of Tableau 2021 and be able to tackle common and advanced challenges in the BI domain.

Publication date:
May 2021
Publisher
Packt
Pages
792
ISBN
9781800561649

 

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.

To get started, begin by opening Tableau Prep Builder:

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

Let's look at what we can see from the preceding screenshot:

  • 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...
 

Prepping data

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.

Insert flow

An option in Tableau Prep Builder is to add an existing flow to your own flow. For example, say someone already worked...

 

Exporting data

Last, but not least, we may want to export our data. We have seen before that a right-click on a symbol in the flow pane offers the possibility to preview the data in Tableau Desktop:

  1. 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

  2. After you do this, the following screen will appear:

    Figure 3.55: Save to file

  3. The user now has the option to save the data to a file, and also to save it in Hyper file format as .hyper, as .xlsx (new in Tableau 2021.1), or as a .csv file.
  4. 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.
  5. 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...
 

Summary

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!

In...

About the Authors

  • Marleen Meier

    Marleen Meier has been working in the field of data science since 2013. Her experience includes Tableau training, proof of concepts, implementation, enablement as well as quantitative analysis, machine learning and AI. In 2018, she was a speaker at the Tableau conference, where she showcased an anomaly detection model using neural networks, visualized in Tableau.

    Browse publications by this author
  • David Baldwin

    David Baldwin has been providing consulting in the business intelligence sector for 22 years. His experience includes Tableau training and consulting, developing BI solutions, project management, technical writing, and web and graphic design. His vertical experience includes financial, healthcare, human resources, aerospace, energy, education, government, and entertainment industries.

    Browse publications by this author

Latest Reviews

(1 reviews total)
Good followup again with access to images excellent
Book Title
Unlock this book and the full library for FREE
Start free trial