How to Embed Data Source in Tableau Workbook

Cody Schneider9 min read

Ever sent a Tableau workbook to a colleague only to get a reply saying, "I can't open it, it's asking for a data file"? It's a frustratingly common problem that happens when the data source isn't included with the workbook itself. This article will show you exactly how to embed your data source directly into your Tableau workbook, creating a self-contained, portable file that anyone can open and view without any connection errors.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What Does It Mean to Embed a Data Source in Tableau?

In Tableau, you generally have two ways of connecting to your data: a live connection or an extract. Think of a live connection like streaming a movie - you need a constant, active internet connection to the source (Netflix) to watch it. If the connection drops, the movie stops. Similarly, a live connection in Tableau requires constant access to the original data file, whether it's a CSV on a shared drive or a database on a server.

Embedding a data source is more like downloading the movie. This is done by creating an extract. An extract is a highly compressed snapshot of your data that is saved directly inside your Tableau workbook. Once the extract is created, Tableau no longer needs to connect to the original data source to display the visualizations. The workbook becomes a self-contained package with both the visuals and the data needed to power them.

When you save this workbook as a Tableau Packaged Workbook (.twbx), you've successfully embedded the data source. You can now email it, upload it, or share it, and anyone with Tableau Reader or Tableau Desktop can open it without issues.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Top 3 Reasons to Embed Your Data

While live connections are great for real-time analysis, embedding your data has several key advantages, especially when it comes to sharing and performance.

  • Ultimate Portability: A workbook with an embedded data source is all-in-one. You don’t need to send the Excel file, CSV, or give database credentials along with your .twb file. Just send the .twbx file, and you’re good to go. This makes sharing with team members, management, or clients incredibly simple and reliable.
  • Improved Performance: Querying large, slow databases or complex spreadsheets can make your dashboards feel sluggish. Because Tableau extracts are highly optimized and stored locally within the workbook, working with them is often much faster. Filters, calculations, and visualizations will load more quickly, creating a smoother user experience.
  • Offline Access & Archiving: Need to work on a flight or give a presentation where internet access is unreliable? With an embedded data source, you don't need a connection to the original data. A .twbx is also perfect for creating a point-in-time snapshot of your data for archival purposes, like a Q4 performance report that should never change.

Step-by-Step: Embedding a File-Based Data Source (Excel or CSV)

The most common scenario for embedding data is with file-based sources like Microsoft Excel or CSV files. The process revolves around two key steps: creating an extract and saving the workbook in the correct format.

Step 1: Connect to Your Data Source

This is the starting point you're already familiar with. Open Tableau, select "Microsoft Excel" (or "Text file" for a CSV), navigate to your file, and open it. Once loaded, you'll see your data in the Data Source pane.

Step 2: Create an Extract

This is where the magic happens. On the Data Source page (the first screen after connecting to your data), look to the top right corner. You’ll see a "Connection" setting with two options:

  1. Live: This is the default. It maintains a direct connection to your original Excel or CSV file. This is what you don't want if you're trying to embed the data.
  2. Extract: Click this radio button. This tells Tableau you want to create a snapshot of your data to store inside the workbook.

Once you select "Extract," an "Edit..." link will appear next to it. Clicking this gives you powerful options to make your extract more efficient:

  • Add Filters: You can add filters to the extract to bring in only the data you need. For example, if you have 10 years of sales data but your report only covers the last 2 years, you can add a date filter here. This significantly reduces the size of the extract and improves performance.
  • Aggregate Data: You can aggregate the data to a higher level. For instance, rather than importing every single transaction, you could roll it up to show daily sales totals. This is useful for large datasets where row-level detail isn't needed.
  • Choose which columns to include: You can hide any unused columns before creating the extract to keep it lean.

You don't have to configure these options, but filtering an extract is a best practice for large datasets.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 3: Save the Extract and the Workbook

After you select "Extract," go to any worksheet in your workbook. The moment you try to build a viz or interact with your data, Tableau will prompt you to save the extract file. This file will have a .hyper extension, which is Tableau's high-speed data engine format.

Choose a location to save your .hyper file and click "Save." Tableau will now pull all the data from your source file and save it as an optimized .hyper file. You will now see that your data source in the Data pane has a double-cylinder icon, indicating it's an extract.

But you're not done yet! Saving the extract is only half the battle. To truly embed it, you must save the entire workbook as a Tableau Packaged Workbook.

  1. Go to File > Save As...
  2. In the "Save as type" dropdown menu, select "Tableau Packaged Workbook (*.twbx)".
  3. Give your file a name and click "Save".

That's it! Your .twbx file now contains your dashboard, your worksheets, and a complete copy of your data file. It is completely self-contained.

TWB vs. TWBX: What's the Difference?

It's vital to understand the difference between Tableau's two main workbook file types:

  • .twb (Tableau Workbook): This is just an XML file that contains instructions. It holds information about your worksheets, dashboards, and how they are configured, but it does not contain any data. It references data files that live elsewhere.
  • .twbx (Tableau Packaged Workbook): This is a special type of zip file. It bundles the .twb file along with the data extract (your .hyper file), plus any custom images or geocoding used in the workbook. This is the all-in-one file you need for sharing.

Embedding Data from Server Connections and Published Sources

The process is slightly different if your data doesn't live in a simple file on your computer.

Connecting to a Database (e.g., SQL Server, PostgreSQL)

If your data source is a live connection to a database, you still follow the same core concept: create an extract.

The steps are identical to the file-based source method. In the Data Source pane, switch the connection from "Live" to "Extract." When you navigate to a sheet, Tableau will process the extract (this may take time depending on the size of the data being pulled from the database). Once finished, save your workbook as a .twbx file to package the newly created extract alongside your dashboards.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Using a Published Data Source from Tableau Server/Cloud

In many companies, data is curated and published to a central Tableau Server or Tableau Cloud environment. When you connect to one of these published data sources, you often can't just create an extract in the same way.

Instead, you need to create a local copy of the data. To do this:

  1. In the Data pane on the left side of your workbook, right-click on the published data source (it will have a Tableau logo).
  2. From the context menu, select "Create Local Copy".
  3. Tableau will ask you where to save this local copy. After you save it, a new data source will appear in your Data pane which is a local extract (.hyper file).
  4. You can now edit your workbook to use this local copy instead of the server version. Be sure to use the "Replace Data Source" option if you want to swap the server connection for your new local copy across all your worksheets.
  5. Finally, save your workbook as a .twbx file to bundle everything together.

Best Practices & Important Reminders

  • Keep Your Data Fresh: An extract is a snapshot in time. It won't update automatically when the original data changes. To update it, right-click your data source in the Data pane and select Extract > Refresh. This will pull the latest data from the original source file or database.
  • Watch Your File Size: Embedding data directly increases the size of your workbook. Importing millions of rows with dozens of columns can result in enormous .twbx files that are difficult to email or share. Always use extract filters to exclude any data that you don't absolutely need for your visualization.
  • Exports are for Portability, Not Real-Time Data: If your dashboard needs to reflect changes that happen moment-to-moment, a live connection is more appropriate. Extracts are best for reports where the data is updated daily, weekly, or for a fixed point in time.

Final Thoughts

Learning how to properly embed a data source is a fundamental Tableau skill that solves one of the biggest headaches in sharing your work. By creating an extract of your data and saving your project as a packaged .twbx file, you create a portable, self-contained report that can be opened by anyone, anywhere, without error messages or missing files.

This whole process of packaging data stems from a common challenge: making insights easily accessible. We know the pain of wrestling with data connections and static reports, which is why we built Graphed. Instead of creating extracts that eventually become stale, our platform lets you connect directly to your live marketing and sales data sources one time. From there, you can build dashboards in seconds using plain English and share them instantly with a secure link, ensuring everyone on your team is always looking at the most up-to-date information.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!