Connecting to
Data Sources
Learn how to connect Tableau to files, spreadsheets, and databases to start building powerful visualizations from real data.
What Is a Data Source?
A data source is any structured collection of information that Tableau reads and transforms into visual analytics. Before you can create a single chart or dashboard, you need to tell Tableau where your data lives and how to read it.
Three Main Source Types
Why Connections Matter
The way you connect to data determines performance, freshness, and security of your dashboards. A poor connection setup leads to slow load times, stale numbers, or even data breaches.
The Connection Workflow
Live vs. Extract Connections
| Live Connection | Extract (.hyper) | |
|---|---|---|
| Data freshness | Real-time | Scheduled refresh |
| Performance | Depends on server | Fast (local cache) |
| Offline access | No | Yes |
| Best for | Small, fast databases | Large datasets, travel |
Connecting to Excel Files
Connecting to CSV Files
CSV (Comma-Separated Values) files are the simplest data format. They contain plain text rows with values separated by commas, making them universally readable by almost any tool.
Connecting to a Database
Database Connection Steps
The Data Source Page
Joins and Unions
Recognizing Data Types
When Tableau reads your data, it assigns a data type to each column. Getting these right is critical: a zip code stored as a number loses leading zeros, and a date stored as text cannot be used for time-series analysis.
Example: Sales CSV
You receive a file called monthly_sales.csv containing order data from your company's e-commerce platform. Let's connect it to Tableau.
Example: Multi-Sheet Excel
Your manager gives you Q4_Report.xlsx with three sheets: October, November, and December. Each sheet has the same columns. You need all three months in one view.
Example: MySQL Database
Your school's IT department provides access to a MySQL server hosting student enrollment data. You need to connect Tableau to it.
Common Mistakes
Summary Comparison
| CSV / Text | Excel | Database | |
|---|---|---|---|
| Connector | "Text file" | "Microsoft Excel" | Server name (e.g., MySQL) |
| Setup | Browse to file | Browse to file | Server + credentials |
| Multi-table | Union (wildcard) | Join / Union sheets | Join / Custom SQL |
| Live support | Yes | Yes | Yes |
| Best for | Simple flat data | Multi-sheet workbooks | Large, relational data |
Key Takeaways
Question 1 of 5
Which connector should you use in Tableau to open a .csv file?
Question 2 of 5
What is the key difference between a Join and a Union in Tableau?
Question 3 of 5
When connecting to a MySQL database, which of the following is NOT required?
Question 4 of 5
You notice that a column of zip codes in your data preview shows values like 1234 instead of 01234. What should you do?
Question 5 of 5
Which connection type would you choose for a large dataset when you need fast dashboard performance and do not need real-time updates?