Tableau Connecting to Data
Every Tableau project starts with connecting to data. Tableau reads data from files, databases, and cloud services. You do not import or copy data into Tableau — Tableau points to the data and reads it directly. This keeps your original files untouched.
Types of Data Sources
Tableau groups its connectors into three categories: files, servers, and cloud services.
Diagram: Data Source Types
[ Tableau Desktop ]
/ | \
/ | \
FILES SERVERS CLOUD SERVICES
| | |
Excel CSV MySQL Salesforce
JSON PDF SQL Server Google Sheets
Spatial PostgreSQL Amazon Redshift
files Oracle Google BigQuery
Connecting to an Excel or CSV File
On the Start Page, click "Microsoft Excel" under Connect. Browse to your file and click Open. Tableau shows a preview of the sheets inside your Excel file. Drag a sheet to the canvas area at the top of the Data Source page. Tableau displays the data in a table preview at the bottom.
Step-by-Step: Connect to Excel
- Open Tableau Desktop
- Click Microsoft Excel under "To a File"
- Select your .xlsx file
- Drag the sheet name to the drag-and-drop area
- Click Sheet 1 tab at the bottom to start visualizing
The Data Source Page
After connecting, Tableau shows the Data Source page. This page has three zones: the left panel lists all sheets and tables in your source, the center shows your data layout, and the bottom shows a sample of the actual data rows.
Diagram: Data Source Page Layout
+----------------------+-------------------------------+ | Left Panel | Center: Data Layout Area | | - Sheet1 | Drag tables here | | - Sheet2 | to join or union them | | - Table A | | | - Table B | | +----------------------+-------------------------------+ | Data Preview (bottom) — shows first 1000 rows | | Col1 | Col2 | Col3 | Col4 | Col5 ... | +------------------------------------------------------+
Live Connection vs Extract
Tableau gives you two modes when you connect to data.
Live Connection — Tableau queries the source directly every time you interact with the view. Your data is always current. This works well when your data changes frequently, like a live sales database.
Extract — Tableau copies a snapshot of the data into a special file (.hyper format). The dashboard runs from this snapshot, not from the original source. Extracts load faster and work offline. Use extracts when data changes only once a day or week.
Analogy
A Live Connection is like calling a restaurant to check today's menu — always current. An Extract is like printing the menu and keeping it in your pocket — faster to check, but may be outdated.
| Mode | Speed | Data Freshness | Works Offline |
|---|---|---|---|
| Live Connection | Slower (queries source each time) | Always current | No |
| Extract | Faster (reads local file) | Snapshot in time | Yes |
Connecting to a Database
To connect to a database like MySQL or SQL Server, click the server name under "To a Server." Enter the server address, port number, username, and password. Tableau lists all available databases and tables. You drag the tables you need to the layout area, just like with Excel sheets.
Renaming and Hiding Fields
After connecting, you can clean up the field names before building charts. Double-click any column header in the data preview to rename it. Right-click a column header and select "Hide" to remove it from the Data Pane without deleting it from the source. These changes affect only your Tableau workbook — the original data source stays the same.
Changing Data Types
Tableau assigns a data type to each field automatically. A column of numbers gets assigned as a Number. A column of dates gets assigned as a Date. Sometimes Tableau guesses wrong — for example, a zip code column may be read as a Number when it should be a String (text). Click the data type icon above each column in the data preview to change it.
Common Data Types in Tableau
| Icon | Data Type | Example Values |
|---|---|---|
| Abc | String (text) | Product name, City, Country |
| # | Number | Sales amount, Quantity, Profit |
| Calendar icon | Date | Order date, Ship date |
| T/F | Boolean | Is Returned? (True/False) |
| Globe icon | Geographic | Country, State, Zip code |
Saving Your Work
Tableau saves workbooks in two formats. A .twb file saves the workbook but not the data — the file still links to the original data source. A .twbx file (Tableau Packaged Workbook) bundles the workbook and the data together. Use .twbx when you want to share a workbook with someone who does not have access to the original data source.
Summary
Tableau connects to files, databases, and cloud services. After connecting, you choose Live Connection or Extract depending on your need for speed versus freshness. The Data Source page lets you rename fields, hide unused columns, and fix data types before you start building. Saving as .twbx bundles your data and workbook into one shareable file.
