How to Add New Data Source in Tableau
Jumping into Tableau is exciting, but before you can build those stunning visualizations, you have to nail the first step: connecting your data. Whether your information lives in a simple spreadsheet or a powerful cloud database, getting it into Tableau is a foundational skill. This guide will walk you through exactly how to add new data sources, from local files to complex servers, and includes a few pro tips for managing them once you're connected.
Understanding Tableau's Data Connection Types
Before you add your data, it's helpful to know what Tableau can handle. Your "new data source" will generally fall into one of two categories: a connection to a file saved on your computer or a connection to a server hosting a database somewhere else.
Tableau breaks these down into two main sections in its "Connect" pane:
- To a File: This is for data you have saved locally or on a shared network drive. The most common types include Microsoft Excel files (.xlsx), Comma Separated Values files (.csv), text files (.txt), and even PDFs. This is perfect for when you're working with data you've exported from another application or a static report.
- To a Server: This is for connecting to live databases and cloud services. This category is much broader and includes everything from traditional databases like Microsoft SQL Server and MySQL to cloud data warehouses like Google BigQuery, Amazon Redshift, and Snowflake. It also covers connections to various online services like Google Analytics and Salesforce. Connecting to a server allows you to work with much larger datasets that update in real-time.
How to Connect to a Local File (Excel & CSV)
Let's start with the most common scenario: connecting to an Excel spreadsheet or a CSV file. This process is your gateway to visualizing most standard business reports, like a list of sales transactions, marketing campaign results, or customer survey responses.
Follow these simple steps:
Step 1: Open the Connect Pane
When you first open Tableau Desktop, you're greeted with the start screen. On the left side, you'll see a blue "Connect" pane. This is your command center for all data connections.
Step 2: Select Your File Type
Under the "To a File" header, you'll see a list of common file types. Click on the one that matches your data source. For this example, let's choose Microsoft Excel.
Step 3: Navigate to Your File
A file browser window will pop up. Locate the Excel file on your computer, select it, and click "Open." Tableau will now process the file and take you to the Data Source page.
Step 4: Set Up Your Data Model
Once connected, the Data Source page will show you the sheets available within your Excel workbook. To use a sheet for your analysis, you need to drag it onto the canvas area at the top that says, "Drag sheets here."
- If your Excel file is tidy, you might just need one sheet. For example, a single sheet called "Orders" that has all your sales data.
- If your data is split across multiple sheets - like an "Orders" sheet and a separate "Customers" sheet - you can drag both onto the canvas. Tableau will automatically try to create a relationship between them based on a common field (like "Customer ID"). This flexible connection, represented by a noodle-like line, is Tableau’s modern way of combining data.
Once you've added your sheets, you'll see a preview of your data in the grid at the bottom. Here you can check if Tableau has correctly identified your data types (like numbers, strings, or dates). If it got one wrong, you can click the data type icon above the column header to change it.
Your data is now connected! You can navigate to a worksheet by clicking "Sheet 1" at the bottom and start building your charts.
How to Connect to a Server Database (e.g., SQL Server)
Connecting to a server is how you tap into more robust company data sources. This method keeps your data live and enables you to query massive amounts of information stored in an organized database without having to download it first.
Step 1: Install Drivers If Needed
For some server-based data sources, Tableau requires a special driver to be installed on your computer. Think of it as a small piece of software that teaches Tableau how to speak that specific database's language. If you need a driver, Tableau will prompt you with a link to its driver download page when you try to connect. It's a quick, one-time setup.
Step 2: Select the Server "To a Server"
Back on the start screen's "Connect" pane, click the "To a Server" header. If you don't see your specific database listed, click "More" to see the full list of over 100 available server connectors.
Let's use Microsoft SQL Server as our example.
Step 3: Enter Your Connection Credentials
A dialog box will appear asking for the server's connection information. You will typically need to provide:
- Server: The server name or IP address.
- Database (Optional): The specific database you want to connect to.
- Authentication: How you will prove you have permission to access the data. This could be your Windows username and password or a specific username and password for the database.
You may need to ask your IT team or database administrator for these credentials. Once everything is entered, click "Sign In."
Step 4: Select Your Tables
After a successful connection, you'll be on the Data Source page, similar to the Excel connection. On the left side, you'll see a dropdown to select your database. Below that, Tableau will list all the tables within that database.
Just like with the Excel sheets, find the tables you need and drag them onto the canvas. For instance, you might drag an Orders table and a Returns table. Tableau's relationship "noodles" will automatically try to link them on a common field like Order ID.
Adding a Second (or Third!) Data Source
Your analysis rarely lives in a bubble with just one data source. You often need to compare actual sales from your SQL database with sales targets stored in an Excel spreadsheet. Adding additional data sources to a single Tableau workbook is easy.
Instead of starting over, you do this from within your workbook:
- Click the "Data" dropdown menu at the top of the interface and select "New Data Source."
- Alternatively, you can click the small icon of a cylinder with a plus sign next to the search bar in the "Data" pane on the left of any worksheet.
This will bring you back to the main "Connect" page, where you can follow all the same steps to connect to your second source, whether it's another file or a completely different server. Once connected, you'll see both data sources listed in your "Data" pane, and you can switch between them as you build different worksheets.
Working with Multiple Data Sources: A Quick Primer
When you have multiple sources, a common question arises: how do you get them to talk to each other? Tableau offers a few primary ways to combine data.
- Relationships & Joins: These are used to combine tables from the same data source on the Data Source page. For example, joining a
Productstable with aSalestable from your PostgreSQL database. Relationships are the newer, more powerful default, while joins are a more rigid, classic method of combining data. - Data Blending: This is the method used to visualize data from different data sources in a single view. For example, if you connected your Google Analytics data and a separate Excel file of marketing budgets, you could use data blending to plot Spend (from Excel) against Sessions (from GA) by
Campaign Name- the field used to link them. Blending happens at the worksheet level, where one source is primary (blue checkmark) and the other is secondary (orange checkmark).
Pro Tips for Managing Your Data Sources
Connecting data is just the beginning. The following tips will help make your analysis process smoother and your visualizations more effective.
Tip 1: Always Customize Your Data Pane
Once connected, rename fields to be more intuitive (e.g., change s_total to Sales Total). You can also group related fields into folders to keep the Data pane tidy. Right-click on fields to rename them, change their data type, or group them.
Tip 2: Use the Data Interpreter
If your Excel file is messy with extra headers, merged cells, or totals thrown in, let Tableau clean it up for you. On the Data Source page, check the box for "Use Data Interpreter." It works wonders on poorly formatted spreadsheets.
Tip 3: Create an Extract When Performance Is Slow
A "Live" connection queries your database every time you make a change in Tableau. This can be slow. An "Extract" connection takes a snapshot of your data and stores a high-performance copy inside your Tableau workbook (.hyper format). Over at the top-right of your Data Source page, simply switch the Connection radio button from "Live" to "Extract." This dramatically speeds up dashboard performance, especially for development.
Tip 4: Watch for the Right Moment to Replace a Data Source
Suppose you built a workbook based on a CSV file, but now that data is moving into an official SQL database. You don't have to rebuild everything. Go to the "Data" menu, select your old data source, choose "Replace Data Source...," and point to your new one. You may have to fix a few fields, but it will save you hours of work.
Final Thoughts
Connecting data in Tableau is a versatile process designed to handle anything from a basic spreadsheet on your desktop to a huge dataset streamed live from a cloud warehouse. Once you understand the fundamental steps for connecting to files or servers, you open up a world of analytical possibilities. Knowing how to add multiple sources and blend them together correctly is what unlocks the deeper business insights you're after.
While the learning curve for tools like Tableau can be steep, especially when managing complex connections and data models, the goal is always to get answers from your information more easily. We designed Graphed to simplify this entire process. Instead of downloading drivers, worrying about connection credentials, or learning data-blending logic, you simply connect your accounts with a few clicks. Then you can use plain English to build dashboards and pull insights in seconds, getting you from raw data to actionable information faster than ever before.
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!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.