This topic describes how to connect Tableau to a Teradata database or a Teradata Unity server and set up the data source.
Before you begin, gather this connection information:
For Teradata database: Name of the server you want to connect to
For Teradata Unity server: URL of the server you want to connect to
Authentication method: Teradata Database, LDAP, or Integrated Authentication
Depending on the environment, the user name and password
Do you need an encrypted connection?
(Optional) Query banding and initial SQL statement to run every time Tableau connects
This connector requires a driver to talk to the database. You might already have the required driver installed on your computer. If the driver is not installed on your computer, Tableau displays a message in the connection dialog box with a link to the Driver Download(Link opens in a new window) page where you can find driver links and installation instructions.
Start Tableau and under Connect, select Teradata. For a complete list of data connections, select More under To a Server. Then do the following:
Enter the name of the server that hosts the database you want to connect to.
Note: You can connect to a Teradata Unity server by entering the appropriate URL in the Server text box.
Select how you want to sign in to the server. Specify whether to use the built-in Teradata Database authentication, LDAP, or Integrated Authentication.
If the server is password protected, and you are not in a Kerberos environment, you must select Teradata Database or LDAP and enter the user name and password.
Select the Require Encryption check box if you need an encrypted connection.
(Optional) Select Query Banding and Initial SQL.
Select Sign In.
If Tableau can't make the connection, verify that your credentials are correct. If you still can't connect, your computer is having trouble locating the server. Contact your network administrator or database administrator.
On the data source page, do the following:
(Optional) Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau. For example, use a data source naming convention that helps other users of the data source figure out which data source to connect to.
From the Database drop-down list, select the search icon or enter the schema name in the text box and select the search icon, and then select the database.
In the Table text box, select the search icon or enter the table name and select the search icon, and then select the table.
You can also specify a stored procedure in the database. For more information and for a list of constraints specific to Teradata databases, see Use a Stored Procedure.
Drag the table or stored procedure to the canvas, and then select the sheet tab to start your analysis.
Use custom SQL to connect to a specific query rather than the entire data source. For more information, see Connect to a Custom SQL Query.
If you use Tableau Desktop on a Mac, when you enter the server name to connect, use a fully qualified domain name, such as mydb.test.ourdomain.lan, instead of a relative domain name, such as mydb or mydb.test.
Alternatively, you can add the domain to the list of Search Domains for the Mac computer so that when you connect, you need to provide only the server name. To update the list of Search Domains, go to System Preferences > Network > Advanced, and then open the DNS tab.
When you connect to a Teradata database, you can optionally define query band statements that run during connection. These statements can increase performance, and they take advantage of the built-in security rules of the database.
Using query bands, you can pass parameters into the Teradata environment. Use these to set up a workbook to filter the data based on security rules that exist in the database. For example, you can pass in the Tableau Server user name for the current user so that when the view is loaded it only shows the data specific to that user. Query bands can also be used to improve performance. When connecting to Teradata, you can define a map between the name of the attributes passed into the query band and the corresponding values from Tableau.
To set up query banding:
On the data source page, select Data > Query Banding and Initial SQL.
- In the subsequent dialog box, specify name/value pairs in the
top text box labeled Query Banding. You can use the Insert drop-down
menu to add Tableau values. The Tableau values are described in
the table below.
Value Description Example
The mode Tableau is operating in when generating queries. This value will either be “Connect” when retrieving metadata or “Analytical” when retrieving actual data. Connect or Analytical
The user name of the person signed in to the database. jsmith
The signed-in Server user. Does not include domain name.
ProxyUserreturns the same value as
ProxyUsersets up impersonation and stores the Tableau Server user in the query band parameter. If you are using query banding for security purposes, you should use
ProxyUserinstead. This will ensure that query results are not shared between different users.
ServerUsershould only be used for auditing purposes.
The signed-in server user including the domain name (if the server is using Active Directory).
ProxyUserFullreturns the same value as
ProxyUserFullsets up impersonation and stores the Tableau Server user in the query band parameter. If you are using query banding for security purposes, you should use
ProxyUserFullinstead. This will ensure that query results are not shared between different users.
ServerUserFullshould only be used for auditing purposes.
Used when setting up impersonation on the server. Provides the username of the current server user.
Used when setting up impersonation on the server. Provides the username and domain name of the current server user.
The name of the Tableau application. Tableau Desktop Professional or Tableau Server
The version of the Tableau application 6100.11.0428.0300
The name of the workbook. Note that this only works for data sources embedded in the workbook. Financial-Analysis
An example query band statement is shown below. This example passes the user name for the current server user.
Tableau checks the statement for errors as you type. When it is valid a green check mark displays at the bottom of the text box.
When you connect to a Teradata database, you can optionally specify a SQL command that will be run once upon connection. See Run Initial SQL to learn more about adding these commands to your connection.
Note: If Tableau detects that the Initial SQL payload cannot be delivered in one query, it attempts to split the query into separate statements, where each statement must end with a semicolon followed by a newline character, with no additional characters (such as an extra space) in between. This requirement is important because if a semicolon exists within the interior of a statement, for example within a string literal, it may not be safe to split the statement at that point. If the Initial SQL code that you specify in Tableau returns an error, and the same Initial SQL is deemed valid by the Teradata databases, it may be that Tableau has split the query incorrectly. If this happens, try reformatting the SQL code in Tableau manually.
- Set Up Data Sources – Add more data to this data source or prepare your data before you analyze it.
- Build Charts and Analyze Data – Begin your data analysis.
Tableau and Teradata: The visual approach to the active warehouse(Link opens in a new window) - Read the Tableau whitepaper (registration or sign in required).