From the course: Cleaning, Transforming and Prepping Your Data With Tableau Prep

Connecting to a data source - Tableau Tutorial

From the course: Cleaning, Transforming and Prepping Your Data With Tableau Prep

Start my 1-month free trial

Connecting to a data source

- The first step in using Tableau Prep is to connect to a data source. There are several options to do this. We can either click on the connect to data button or we can open up the data connection pane on the left-hand side. We can then either connect to a file on this machine or to a server This might be a local server to you or a web connection. In this example, I'm going to connect to some local files. First, let's open up an Excel file. I'm looking in the exercise folder. I'm going to open up this Spielberg Ratings file. Prep has identified that there are two sheets in this file, one called audience scores and one called critic scores. To add the data to my workflow, I simply drag it from the left-hand side into the pane. We can now see the data in this file. We can see the field name, and we have a sample of some of the values. Let's go ahead and add some more data. So, I can click on the plus to bring in another file. This time, I have a CSV file, so for that, it's a text file, and I'm going to bring in the Scores.csv. Again, when we open this, we get a very similar dialog. However, there is a little change down here called text options; this is useful if your CSV file doesn't contain header options. In this case, my first line is a header. And it's correctly identified that. And it's named the columns accordingly. Now, I can combine these two data sources together into a single file and carry on and do my analysis. Another very useful function that Prep has is connect to PDF files. This allows us to extract tables from PDF documents. So, let's go ahead a connect to a PDF exercise folder. 2016 traffic report. Now here, we can see that Prep has analyzed the PDF and found several tables across multiple pages. So I'm going to select this table here, I'm going to drag it over, and now, I can see that it's made an attempt to bring in the data. However, these field names don't look quite right. What I can use is the data interpreter to correct that. Tableau then does some more analysis on that table structure and correctly identifies the column names for that data; I'd recommend always keeping your data sources in a default data sources folder in your Tableau Prep repository. This means that you can always access your data, and it's consistently saved in the same place. After, we input our data, we can then go on and do our cleaning and the rest of our analysis.

Contents