0
0
Tableaubi_tool~5 mins

Database connections (SQL Server, PostgreSQL) in Tableau - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
This feature helps you connect Tableau to databases like SQL Server and PostgreSQL. It lets you bring your data into Tableau so you can create reports and dashboards easily.
When you want to analyze sales data stored in a SQL Server database.
When your marketing data is in PostgreSQL and you need to build visual reports.
When you want to combine data from your company database with other sources in Tableau.
When you need live data updates from your database in your Tableau dashboards.
When you want to explore data without exporting it manually from your database.
Steps
Step 1: Open Tableau Desktop
- Start page
You see options to connect to data sources including databases
Step 2: Click 'More' under 'To a Server' section
- Connect pane on the left
A list of database connectors appears
Step 3: Select 'Microsoft SQL Server' or 'PostgreSQL' from the list
- Database connectors list
Connection dialog box for the selected database opens
Step 4: Type the server name or IP address in the 'Server' field
- Connection dialog box
Server field is filled with your database location
Step 5: Enter your database username and password
- Authentication section of the connection dialog
Credentials are set for database access
Step 6: Click 'Sign In' or 'Connect'
- Connection dialog box
Tableau connects to the database and shows available tables
Step 7: Drag a table to the canvas to start building your data source
- Data source page
Table data preview appears and you can start creating visualizations
Before vs After
Before
Tableau shows only sample data sources and no connection to your company database
After
Tableau shows tables from your SQL Server or PostgreSQL database ready for analysis
Settings Reference
Server
📍 Connection dialog box
Specifies the database server to connect to
Authentication
📍 Connection dialog box
Defines how Tableau logs into the database
Default: Username and Password
Database
📍 Connection dialog box after server connection
Selects which database to use on the server
Default: Default database for user
Port
📍 Connection dialog box (optional)
Specifies the network port for the database connection
Default: 1433 for SQL Server, 5432 for PostgreSQL
Common Mistakes
Entering incorrect server name or IP address
Tableau cannot find the database server and connection fails
Verify the exact server name or IP address with your database administrator before entering
Using wrong username or password
Authentication fails and Tableau cannot access data
Use valid credentials provided by your database admin and check for case sensitivity
Not specifying the correct port when the database uses a non-default port
Connection attempts time out or fail
Ask your admin for the correct port and enter it in the connection settings
Summary
You can connect Tableau directly to SQL Server and PostgreSQL databases to use live data.
Enter the server, credentials, and database details carefully to establish the connection.
Once connected, you can drag tables into Tableau to start creating reports and dashboards.