Which SQL does Redshift use

Amazon Redshift

This article describes how to connect Tableau to an Amazon Redshift database and how to set up the data source.

requirements

First, collect this connection information:

  • Name of the server hosting the database that you want to connect to

  • Database name

  • Username and password

  • Do you want to connect to an SSL server?

  • (Optional) Initial SQL statement that is run every time Tableau connects

Driver required

A driver is required for this connector to communicate with the database. The required driver may already be installed on your computer. If the driver is not installed on your computer, Tableau will display a message in the connection dialog with a link to the Download Driver page (Link opens in a new window). There you will find driver links and installation instructions.

Establishing the connection and setting up the data source

  1. Launch Tableau and under Connect, select Amazon Redshift. A comprehensive list of data connections is displayed when you select More under With a server. Then do the following:

    1. Enter the name of the host server for the database and the name of the database you want to connect to.
    2. Enter the username and password.
    3. (Option) Enter custom driver parameters to change the connection.
    4. When connecting to an SSL server, select the Require SSL check box.
    5. (Optional) Select Initial SQL Dates to specify an SQL command to run at the start of every connection, such as: For example, when you open a workbook, refresh an extract, sign in to Tableau Server, or publish content to Tableau Server. For more information, see Executing Initial SQL.
    6. Select Sign In.

      If Tableau cannot connect, verify that your credentials are correct. If you still cannot connect, the computer cannot find the server. Contact your network administrator or database administrator.

  2. On the data sources page, do the following:
    1. (Optional) Select the default data source name at the top of the page, then enter a unique data source name to use in Tableau. For example, you can use a data source naming convention to help other users determine which data source to connect.

    2. Select a scheme from the Scheme drop-down list, or use the text box to find a scheme by name.
    3. Under Table, select a table, or use the text box to find a table by name.
    4. Drag the table into the work area, then click 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.

Adjusting the connection using driver parameters

There may be times when you want to change the connection with the Amazon Redshift Connector. Starting with Tableau 2019.2.1, you can do this by appending driver parameters to the connection string in the Enter custom driver parameters text box:

Note: You cannot change the driver parameters that Tableau generates; You can only append the parameters.

In this example, agarcia enters parameters that enable federated authentication using IDP:

DbUser = agarcia; AutoCreate = 1; AuthType = Plugin; plugin_name = Ping; IAM = 1; idp_host = idp.business-example.com; idp_port = 443; preferred_role = arn: aws: iam :: 12345: role / dev; partner_spid = urn: amazon: webservices;

In this example, you limit the number of rows retrieved to 1000:

Fetch = 1000;

For details on driver parameters, see ODBC Driver Configuration Options (Link opens in a new window) on the Amazon AWS website.

Sign in to a Mac

If you are using Tableau Desktop on a Mac, enter a fully qualified domain name (for example, "mydb.test.ourdomain.lan") instead of a relative domain name (for example, "mydb" or "mydb.test").

Alternatively, you can add the domain to the list of search domains for the Mac computer so that you only need to provide the server name to connect. To update the list of search domains, go to System Preferences> Network> Advanced, then open the DNS tab.

See also