Subject Area: Architecture
Level of complexity: Beginner
Approximate Time to complete: 1 hour
Companion Workbook (twbx): DataSources.twbx
Additional Resources on the web:
What is a Tableau Data Source?
Every time you use the "Connect to Data" menu, you create a Tableau Data Source. A Data Source describes the physical source of the data (file name + location or database connection), the table joins and all of the metadata (hierarchies, folders, aliases, names, and calculations).
Why create saved Data Sources?
Connecting to your data and joining it correctly can take time, effort and knowledge of your data structure. By saving the Data Sources locally or publishing them to Tableau Server, you only have to put this effort in once, and your time can be spent analyzing the data in Tableau.
Creating a Data Source
Regardless of the connection type, first step to a data source is getting all necessary data via the Connect to Data menu. This could be a single worksheet in an Excel file or joining multiple tables together in a database.
The unsaved data source appears in Top Left under the Data list. All of the fields come through from the original source, with Tableau taking its best guess as data types and organizing based on the source tables.
Now you can begin to make changes to the data source, mostly via the right-click menu options in the dimensions and measures lists. Unneeded fields can be hidden via "Hide". Different groupings can be created via "Group By Folder".
Hierarchies can be created by dragging and dropping fields over one another. Geographic roles and default properties can be set via the right-click menus.
Saving a Data Source
Once you've made all of the metadata changes, you can save the Data Source locally as .tds file by right-clicking the Data Source name and choosing "Add to Saved Data Sources…". The .tds file will be saved into your My Tableau Repository->Datasources folder.
A .tds file only stores information about the connection, not any of the data. If you want to share the connection and include any locally stored data (Excel, text file or Tableau Data Extract), you can save the connection as a Packaged Data Source (.tdsx) file. If sharing a live database connection, use .tds so data is always refreshed on the connection.
It will now appear in the "Saved data sources" menu in the Connect to Data screen or as part of the Home screen