How to Save TDS File in Tableau
Saving your data source in Tableau is one of those simple habits that can save you countless hours down the line. Instead of connecting to your database and rebuilding your calculated fields, groups, and hierarchies every time you start a new workbook, you can save it all in a Tableau Data Source (.tds) file. This article will walk you through exactly what .tds files are, why they’re so useful, and how to create and use them step-by-step.
What is a Tableau Data Source (.tds) File?
Think of a .tds file as a shortcut or a recipe for your data connection. It doesn’t contain the actual data itself. Instead, it stores all the configuration and modifications you've made to a data source, making it easy to reuse over and over again. It’s a small, lightweight blueprint for your data model.
To grasp the concept fully, it helps to understand what a .tds file contains - and what it doesn’t.
What's Inside a .tds File?
- Connection Information: This includes the server address, database name, authentication type, and port. For file-based sources like Excel, it contains the file path.
- Calculated Fields: Any custom formulas you've created, like
SUM([Sales]) / SUM([Profit])to calculate profit ratio. - Groups, Sets, and Hierarchies: Custom groupings (e.g., grouping states into regions) and hierarchies (e.g., Category > Sub-Category > Product Name) are saved.
- Default Properties: Any default settings you've applied to specific fields, such as number formatting (currency, percentage), color palettes, aggregations (SUM, AVG), and sorting.
- Field Aliases and Comments: Custom names you’ve given to fields (e.g., renaming CUST_ID to Customer ID) and any descriptive comments are stored.
What's Not Inside a .tds File?
- The Actual Data: This is the most important distinction. A .tds file assumes you have access to the original, underlying data source (like the SQL database or the Excel file). When you connect using a .tds, Tableau uses the saved instructions to connect to that live data.
.tds vs. Other Tableau File Types
Tableau has several file extensions, and knowing the difference is half the battle:
- .tds (Tableau Data Source): The shortcut. It stores connection info and metadata. Great for live connections.
- .twb (Tableau Workbook): Contains your worksheets, dashboards, and stories, along with the connection info to the data source (either direct or via a .tds). It does not store the data itself.
- .hyper/.tde (Tableau Data Extract): These are snapshots of your data, optimized for performance. When you create an extract, you are pulling the data from the source and storing it locally in this highly compressed format.
- .tdsx (Tableau Packaged Data Source): This is a zipped folder containing the .tds file and the .hyper/.tde extract file. It bundles the data connection recipe with the data itself, making it portable. You’d share this with someone who doesn’t have access to the original live data source.
- .twbx (Tableau Packaged Workbook): A zipped folder containing the .twb file, the data (.tdsx, .hyper/.tde), and any custom images or shapes used in the workbook. It’s the most complete, self-contained way to share a Tableau project.
For this guide, we're focusing on the foundational .tds file, which is ideal for working with live, centrally located data sources that your team uses frequently.
Why You Should Be Using .tds Files
Saving your data sources might seem like an optional, extra step, but embracing it as part of your workflow brings several game-changing benefits. Here’s why you'll want to start using .tds files today.
1. Save Time and Reduce Tedious Repetition
Imagine you have a core sales database you analyze every day. Every time you start a new Tableau workbook to answer a new business question, you have to find the server name, connect to the database, and then recreate the same essential calculated fields all over again - like Profit Margin, Customer LTV, or YoY Growth. This isn't just inefficient, it's a drag.
With a .tds file, you do that setup work once. Create the calculations, set up the hierarchies, and format your Key Performance Indicators (KPIs) exactly how you want them. Then save it. The next time you need to analyze that data, simply connect to your .tds file, and all that groundwork is instantly available. You can jump straight into the analysis.
Free PDF Guide
AI for Data Analysis Crash Course
Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.
2. Standardize Metrics and Ensure Consistency
Different people on a team can calculate the same metric in slightly different ways. One person might define “Active User” one way, while another uses a slightly different formula. This leads to conflicting reports and erodes trust in the data.
By creating and sharing a central .tds file, you establish a "single source of truth" for your analytics. Everyone on the team connects to the same pre-configured data model. The calculated field for Gross Margin is already defined, the regional groupings are set in stone, and fiscal calendars are correctly configured. This ensures every report pulled from this data source is built on the same logic, leading to consistent, reliable insights across the organization.
3. Empower Self-Service and Boost Collaboration
A well-prepared .tds file acts as an accelerant for your team. When a new person joins or another department needs to access your sales data, you don't have to send them a long document explaining server details and required calculations. You simply send them the .tds file (or point them to its location on a shared drive or Tableau Server).
They can connect and immediately have access to a clean, user-friendly data source with clear field names and curated logic. This lowers the technical barrier to entry and encourages more people within the company to explore data and find their own answers without depending on the data team for every little report.
4. Simplify Data Governance and Control
The .tds file allows an analyst or data steward to prepare a data source and then hide fields that are irrelevant, confusing, or sensitive. You can craft a perfect, curated view of the data that only exposes what end users need. In a large database with hundreds or thousands of tables and columns, this is invaluable.
You can pre-join tables, set up data models, and save it all in a .tds file. Business users then interact with this simplified model, never having to worry about the underlying complexity of the database schema.
Step-by-Step Guide: How to Create and Save a .tds File
Creating a .tds file is straightforward. Let's walk through the process with a simple example. For this, we'll use Tableau's famous Sample - Superstore dataset, but the steps are IDENTICAL for any data source, whether it’s an Excel file, a Google Sheet, or a Microsoft SQL Server database.
Step 1: Connect to your data
First, open Tableau and connect to your chosen data source. For our example, select Microsoft Excel and find the Sample - Superstore.xls file typically located in My Documents/My Tableau Repository/Datasources.
Step 2: Prepare Your Data Source
This is where you make the modifications you want to save. You don't need to build any charts yet. All this work happens directly in the data pane on the left side of your worksheet view.
Let’s make a few common modifications:
Create a Calculated Field
Let's create a Profit Margin calculation. In the data pane, right-click on an empty space and select Create Calculated Field...
- Name: Profit Margin
- Formula:
`SUM([Profit]) / SUM([Sales])`
Press OK. Now, change its default formatting to be more useful. Right-click on your new Profit Margin field, go to Default Properties, then Number Format..., and select Percentage.
Create a Hierarchy
A location hierarchy is very useful for drill-down maps. Find State in your data pane, then drag the City field on top of the State field. Name the hierarchy Geographic Location. Finally, drag Postal Code into that same hierarchy below City.
Create a Group
Imagine your business divides the US into East and West regions based on specific states. Right-click on the State field, select Create, then Group...
- Select states like California, Washington, Arizona, and Oregon, then click Group. Name this group “West.”
- Select a few East Coast states like New York, Florida, and Massachusetts, and group them as “East.”
- Click OK. You'll now have a new field called State (group). Feel free to rename it something cleaner, like Custom Region.
After these steps, your data pane now has custom logic ready for analysis. This is the valuable work you want to save.
Free PDF Guide
AI for Data Analysis Crash Course
Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.
Step 3: Save the Data Source
With all your modifications in place, saving the data source is just a right-click away.
- Hover over your data source name at the top of the Data pane (in our case, Orders (Sample - Superstore)).
- Right-click on the data source name.
- From the context menu that appears, select Add to Saved Data Sources...
Step 4: Name and Save Your File
A “Save Data Source” dialog box will pop up. Tableau automatically points you to the Datasources folder in your My Tableau Repository.
- Filename: Give your data source a clear, descriptive name. For example, Superstore Sales Model with Custom Regions. The file will be saved with a
.tdsextension. - Location: It's a best practice to save it in the default location that Tableau suggests. Why? Because this allows Tableau to list it under the “Saved Data Sources” link on the startup screen for quick access.
Click Save.
That’s it! You've successfully captured all your data model improvements in a reusable .tds file.
How to Use Your Newly Saved .tds File
Now for the payoff. Close your current Tableau workbook (no need to save it). Imagine you're starting a new project a week later.
1. Open a fresh instance of Tableau.
2. On the startup “Connect” pane on the left, you'll see a link called Saved Data Sources. Click on it.
3. Your Superstore Sales Model with Custom Regions.tds file will be listed there. Click it to connect.
Tableau will instantly connect to the Superstore Excel file and load all of your pre-built work. Look at the data pane - your Profit Margin calculated field, your Geographic Location hierarchy, and your Custom Region group are all there, ready to be dragged onto your canvas. No rework required.
Final Thoughts
Mastering the use of .tds files in Tableau is a fundamental step toward becoming a more efficient and effective analyst. By saving your data source configurations, you’re not just saving a few clicks, you’re creating a single source of truth that standardizes team-wide metrics, streamlines collaboration, and lets you spend more time on discovery and less on repetitive prep work.
At the end of the day, all data prep is about getting to insights faster. That's why we created Graphed . We wanted to help teams move beyond the learning curve of traditional BI tools altogether. Instead of manually creating calculated fields and dashboards, you can connect your data sources to Graphed and use simple language to ask questions like, “Show me my profit margin by custom region as a map.” Graphed instantly builds the exact visualization you need, getting you from question to insight in seconds, not hours.
Related Articles
Facebook Ads for Gyms: The Complete 2026 Strategy Guide
Master Facebook advertising for your gym in 2026. Learn the proven 6-section framework, targeting strategies, and ad formats that drive memberships.
Facebook Ads for Home Cleaners: The Complete 2026 Strategy Guide
Learn how to run Facebook ads for home cleaners in 2026. Discover the best ad formats, targeting strategies, and budgeting tips to generate more leads.
Facebook Ads for Pet Grooming: The Complete 2026 Strategy Guide
Learn how to run Facebook ads for pet grooming businesses in 2025. Discover AI-powered creative scaling, pain point discovery strategies, and the new customer offer that works.