Today, we will go through the different ways you can connect data in Tableau: from simple Tableau data connections to Advanced Tableau data connections using extracts.
Simple Tableau Data Connections and the Data Connection Interface
- Download the detailed and updated “Superstore” Excel file below. (You can use your own data for this as well!)
- Open Tableau.
- In Tableau, click the Connect to Data text in the top left.
- Next, click Microsoft Excel under “In a File” and select the file you just downloaded.
- Under sheets, it will list all the worksheets in your Excel file. In this case, double click the Orders data set. It will automatically appear in the top pane. You’ll now see the data contained in the file shown below. Here you can edit a column name.
- We can change the workbook name by clicking on the title and typing something new. Let’s remove the parentheses.
- You can also change the workbook connection here, though we won’t do that now.
- You can filter which data you allow in by clicking up at the top right. We won’t do that for this lesson. This enables you to filter out data that you know you won’t be needing, which helps Tableau run faster.
- You can also tell Tableau whether you want to create a Live connection vs. Extract connection. We will discuss this in more detail later in the course. For now, just connect Live.
- Click on “Sheet 1” on the bottom left to go to the work window.
Advanced Tableau Data Connection through Extracts
When it comes to ensuring the optimal performance and accessibility of your dashboards, Tableau extracts comes to the rescue. First, let’s analyze Tableau Extracts. We discussed what they were previously. Basically, they build an in-memory database of your data so that you can query it much faster. You don’t have to ping your actual database each time and re-render all the data.
As a general rule of thumb, use extracts always, because of the speed gains you will achieve. To create these:
- You have two options. You can create it from the main data connection window via the radio button at the top right. Or, once inside a file, you can right click on your Tableau data connection at the top left, and choose “Extract Data.”
- Upon clicking this, a new window will pop up.
- The top portion will allow you to filter out any Tableau data that you don’t want to come into your extract. Say all of your analysis will be aggregated at the region level, so you don’t need to bring in states, as an example.
- Speaking of, you can set the aggregation. An example might be you have Tableau data at the hourly level, but don’t need it that granularly. You can aggregate it at the day level. When Tableau builds your extract, it will perform that process as part of the load. This will make the workbook faster when you access it.
- Finally, you can tell it to rebuild the extract (i.e. database) from scratch each time you refresh it. This is a full refresh. You can also tell it to do an incremental refresh, only adding new Tableau data from the last refresh. This is useful as it speeds up extract creation time, but you have to be careful about old data changing. If a change has been made to data that is already in your extract, it won’t capture that.
- As a best practice, if you are creating workbooks that will utilize the same data, create an extract of the data and save it Tableau Server as a data source. Set it to extract and use Server to set a schedule. This automates your data collection. It’s awesome. Every time new data comes into the database, your extract will go get it on the schedule and automatically update your workbooks with the new data.
We hope you learned a lot from our Tableau data connection tutorial. To better understand the power of live and extract Tableau data connection, be sure to check out our Tableau classes.