How to connect to Tableau with Azure Resources — Part 2

Overview

This is a continuation of our four-part blog series dedicated on simplifying Tableau connectivity with azure resources. In the first part, we showed you how to connect tableau with Azure Synapse Analytics and in this second part, you will learn about connecting Tableau with Azure SQL Database and set up the data source.

Prerequisites Before We Begin:

  1. Server Name that hosts the DB you want to connect. For example, myserver.database.windows.net
  2. DB Name (Optional)
  3. Authentication can be any of the following:
  • Username and its Password
  • Active Directory (AD) Password
  • Azure Active Directory via OAuth (integrated)

Note : To use AAD via OAuth, your system administrator must enable “user consent” in your organization’s Azure Active Directory tenant. Click here for more information.

Setting up Tableau Connectivity with Azure SQL DB

  • Open Tableau desktop and navigate to connect
  • Select Azure SQL DB from the list of data connections under “To a Server” Option. Once selected, the following dialog box will appear:
  • Enter the Server Name/URL with which you want to connect
  • DB Name is Optional, If you provide the DB name, the connection will be established to the corresponding DB.
  • Username & Password (Authentication Option 1): Enter your username and password of your Server to authenticate and access the resource
  • Azure Directory Password (Authentication Option 2): Enter your login username and password to authenticate and access the resource
  • Azure Active Directory via OAuth(Authentication Option 3) : You need to enter the OAuth Instance URL and then login with username and password from your default browser and access the resource.

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

  • After you have selected your preferred mode of authentication, a dialog box will appear and navigate you to your default browser for completion of authentication
  • On successful authentication, you will be redirected to tableau workbook
  • Select the Required SSL check box when connecting to an SSL server
  • Specify whether to Read uncommitted data. This option lets Tableau run at the read-uncommitted isolation level. Long queries from Tableau, including extract refreshes, can lock the database and delay transactions. Select this option to allow queries to read rows that have been modified by other transactions even when they have not been committed yet. When this option is not selected, Tableau uses the default isolation level specified by the database.
  • Initial SQL (Optional) : To specify a SQL command to run at the beginning of every connection, such as when you open the workbook, refresh an extract, sign in to Tableau Server, or publish to Tableau Server. Visit this site for more information
  • Select Sign-in and if the sign-in fails, verify your credentials. If you still can’t connect, contact your network administrator or database administrator.

Data Source Page Options

For selecting your database follow the below steps:

  1. Select the default data source name at the top of the page, and then enter a unique data source name for use in Tableau.
  2. Select a DB from the Database drop-down list and connect to it.
  3. You can Drag a table to the canvas, and then select the sheet tab to start your analysis
  4. Use Custom SQL to connect to a specific Query rather than the entire Data Source. Visit the link for more information

Note: Tableau Desktop does not support the Microsoft SQL Server TIME data type. Fields of this data type are not imported and do not appear in Tableau Desktop. If included in stored procedures, TIME data type fields will not appear in Tableau Desktop.

Sign in on a Mac

If you use Tableau Desktop on a Mac, when you enter the server name to connect, use a fully qualified domain name. For example give domain name as mydb.test.ourdomain.lan, instead of a relative domain name 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.

Note: Azure Active Directory via OAuth (integrated) is not supported on a Mac.

And that’s all folks!. You should be all connected to Azure SQL database from your tableau. I hope you find this article easy-to-grasp and useful for your setup. Follow us on Knowledge Lens for more such content 😃.

--

--