What is the Azure SQL Database

Azure SQL Database

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

requirements

First, collect this connection information:

  • Fully qualified name of the server hosting the database you are trying to connect to. Example: myserver-20171113.database.windows.net

  • (Optional) Name of the database

  • Authentication method:

    • Username and Password

    • Active Directory password

    • Azure Active Directory via OAuth (integrated)

      Note: To use this option, your system administrator must enable "User Consent" in your organization's Azure Active Directory tenant. For more information, see Microsoft's documentation on configuring user consent.

  • The credentials depend on the authentication method selected and can include the following:

    • Username and Password

    • Active Directory username and password

    • Azure Active Directory Instance URL

  • Do you want to connect to an SSL server?

  • Do you want to set the database isolation level with respect to "Read Uncommitted Data"?

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

Establishing the connection and setting up the data source

  1. Start Tableau and select under Connect the option Azure SQL database out. A comprehensive list of data connections is available if you click under With a server the option More choose. Then do the following:
    1. Enter the URL of the server you want to connect to.
    2. (Optional) Enter the name of a database if you want to connect to a contained database.
    3. Specify how you want to log in to the server - with a username and password, with an Active Directory username and password, or with an integrated Azure Active Directory login via OAuth.
    4. Enter your username and password.
      If you are using Azure Active Directory through OAuth, enter an Azure Active Directory Instance URL. For more information, see Microsoft's documentation on endpoints (Link opens in a new window).

      Note: If your organization uses more than one Azure Active Directory tenant, the Azure Active Directory instance URL must match the tenant in which the database is configured. You can get the tenant ID in your Azure portal or from your Azure administrator.

    5. When connecting to an SSL server, select the Require SSL check box.
    6. Specify whether to: Read uncommitted data. This option allows Tableau to run at the isolation level without read access. Long queries from Tableau - including extract updates - can block the database and delay transactions. Select this option to allow queries to read rows that have been modified by other transactions, even if they have not yet been committed. If this option is cleared, Tableau will use the default isolation level provided by the database.
    7. (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.
    8. 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 database from the Database drop-down list.

    3. Under Table, select a table or type part of its name in the search box to find the table.

      You can also specify a stored procedure in the database. For more information about stored procedures and a list of restrictions specific to SQL Server databases, see Using a Stored Procedure.

    4. Drag the table onto 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.

Note: The Microsoft SQL Server TIME data type is not supported in Tableau Desktop. Fields of this data type will not be imported and will not appear in Tableau Desktop. TIME data type fields do not appear in Tableau Desktop when contained in stored procedures. For more information, see Using a Saved Procedure.

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.

Note: Azure Active Directory over OAuth (built-in) is not supported on a Mac

See also