Sign in or start a free trial to avail of this feature.
8. Saving our Work
We'll learn how output our flow to Tableau in this lesson by using the output step.
This goal of this lesson is to save our work in Tableau Prep and to output the cleaned datasets.
We can save our work in two ways. We can save the workflow in a Tableau Flow File (.tfl). This method is ideal for reusing the same steps on future data.
If you want to share your work on the current dataset with another user, you can share a .tfl file and the dataset. The other user will have to connect the workflow to the dataset. A better alternative to this is using the Packaged Tableau Flow File (.tflx). This file contains the dataset so the collaborator doesn’t have to manually connect it.
Once we’ve completed preparing our data we can export it for use in Tableau Desktop. We can export it as a Tableau Extract or a Hyper file. Hyper files are larger than tde files, but they can be read more quickly. If we want to share our data with users who don’t use Tableau, we can output the data as a csv.
In the previous lessons, we inputted and cleaned our data.
In this lesson, we'll save our workflow and export our data. First, we'll save our workflow.
This is especially useful if you're going to repeat the same process multiple times on new data. If this is the case, all we have to do is change the data sets at the input step.
We'll navigate to the File menu, and select Save As.
Similar to Tableau Desktop, there are two ways to save our flows. We can save as a regular flow file with a file extension .TFL or as a packaged flow file with the extension .TFLX.
When using a regular flow file, the input steps are expecting our datasets to be in the same place with the same name. As long as the dataset we used with the input steps hasn't been moved or renamed, everything will work correctly. However, this is problematic if we want to share these files with a colleague. If they do not have all the required datasets, they will not be able to use our workflow.
To solve this problem, we'll create a packaged flow file which bundles the datasets and flow file together so they can be easily circulated.
We'll now export our dataset. Up to this point, we've made all the necessary fixes to prepare our data for Tableau Desktop. It's time to export this single dataset into file that can be read by Tableau Desktop or another software type. We'll click the plus sign next to Clean 1 and select Add Output.
We'll click on the new Output step, and have a look at the profile pane.
To the left, we have the option to save as a file or publish as a data source.
The second option will add the dataset to a server.
We want to create a local file, so we'll ensure Save to file is selected. We'll click Browse to open a dialog box, choose a destination folder and write a name.
We'll call this Sales 2012-2016 and click Accept.
Below we have a summary of the file to be outputted. We have the Name, Location, and Output type.
When we click on Output type, we have three options. The first two are Tableau Data Extracts, hyper and TDE. These are two extract types that can only be read by Tableau products.
Hyper files are larger than TDE files but they can be read more quickly. The third option is a Comma Separated Values file.
This is a simple file type which can be read by most software.
Unless you intend on using this data exclusively with Tableau Desktop, it's advisable to select CSV.
With all our parameters selected, we can now output our data. We can do this in a few ways.
We can simply click Run Flow at the bottom of the output step profile pane, or we can use the shortcut keys Ctrl + R.
Our dataset has now been outputted to a file, bringing our lesson to a close. With that, our course on data cleaning in Tableau Prep is now complete.
Throughout this course, we've developed a number of skills. We've inputted data, cleaned data, split fields, and grouped and replaced fields.
Going forward, you should be able to successfully clean any dataset in preparation for analysis with Tableau Desktop.