Edit and Save a Data Source
Lesson Objectives
After completing this unit, you'll be able to:
- Make changes to metadata within Tableau Desktop.
- Save a customized data source using Tableau Desktop.
- Change the location of your data source.
You are now connected to your data and ready to start your analysis. This is great! But you quickly realize that the data doesn’t look exactly the way you want it to.
Some of the field names don’t accurately convey the type of data they contain. Before creating visualizations and dashboards, you need to ensure the field names are more intuitive. It’s time to organize the data differently.
The good news is that you can make all these changes right in Tableau Desktop. You can do all of these things (and more) to prep your data for analysis on the data source page.
Edit a Data Source
A Tableau data source (.tds) is a file you can use to save any data attributes you have edited for a connected data source. The .tds file saves the connection information and any organizational or metadata changes you make.
Metadata is information about the data, such as the field name, data type, or default aggregation. You can modify data attributes on a data source, save those modifications in the .tds file, and share that data source file with other users. These changes do not affect the underlying data source.
What Types of Changes Can You Make to Metadata?
Some of the changes include:
- Renaming a field
- Modifying the default properties for a measure
- Organizing dimensions and measures into folders
- Changing a measure to a dimension or a dimension to a measure
How Do You Make Changes to a Data Source?
You can edit the metadata in the Data Source Page and in the Worksheet.
Edit Metadata on the Data Source Page
On the data source page, when you add a sheet to the canvas area, you see a preview of it in the data grid. You can also see data on the metadata grid. The data grid view shows fields names in columns, whereas the metadata grid view lets you see all of fields in a list (rows), which makes it easier to edit data and provides a complete view of the underlying data structure.
To go to the metadata grid, click .
Some of the changes you can make in the metadata grid view include, changing or resetting field names.
You can also reset the column name with the Reset Name option found in the field dropdown.
You can also change the data type for any field by clicking the data type icon next to the field and then selecting the desired data type from the list.
You can also make similar changes within the worksheet itself.
Edit Data Attributes Within the Worksheet
When creating a visualization, you may need to make quick edits to your data source. For example, you may decide to change the data type or the name of a field to meet the needs of the analysis you are doing. You can make quick edits to your data source within a worksheet.
Save the Data Source
After you modify data attributes, save the customized data source so you don’t have to make those changes again across workbooks. You can connect to your saved data source, and you can also share it with others in your organization.
Formats for Saving a Data Source
You can save a data source to either a Data Source file or a Packaged Data Source file, as described here.
Data Source (.tds). This file contains only the information you need to connect to the data source, including:
- Data source type
- Connection information specified on the data source page; for example, database server address, port, location of local files, tables
- Default field properties; for example, number formats, aggregation, and sort order
Choose this format if you are the only person who will use it, or the data is hosted on a cloud platform, and your colleagues all have the same access you do.
Packaged Data Source (.tdsx). This contains all information in the data source (.tds) file, and a copy of local file-based data or extract.
A packaged data source is a single zipped file. Use this format if you want to share your data source with people who do not have access to the underlying data that is defined in the connection information.
Change the Location of the Underlying Data Source
You also have the option of changing the location of the underlying data source. For example, suppose the name or location of a data source you were using has changed and is no longer available using the previous connection information. In this case, you can direct the workbook to the correct location without losing your work.
If you are connected to a data source that has been modified, you can immediately update Tableau Desktop with the changes by selecting a data source on the Data menu and then selecting Refresh.
So far, you’ve learned how to use Tableau Desktop to connect to a data source and modify the metadata as needed for your analysis.
Continue your data journey by moving on to the next unit, where you practice the concepts you’ve learned.