At the heart of every visualization is data. Tableau provides a myriad of ways to take your raw data and bring it to life through visualizations. The process of bringing data into Tableau is called a data connection, and it is the first thing that Tableau will ask of you when you start developing your visualizations.

Because there are so many ways to bring data into a workbook, Tableau groups the types of data connections into three main categories: Tableau Server, File, and Server.

The File category encompasses the gamut of different files you can reference. These include text, CSV, JSON, Excel, etc.

Under the Server category, data can be acquired from a host of different relational and NoSQL data sources. First getting data from numerous disparate sources into a single database can be difficult, so Zuar offers the Mitto solution to simplify and automate the process. Visit here to learn more about Mitto.

The Tableau Server Data Source enables access to data sources created and housed in a Tableau Server, which is excellent if you need access to data sources used in other Tableau reports.

Regardless of the data source, the initial process is the same. When you open a new workbook, Tableau will display a blue pane on the left side of the window with the categories and the data source types therein.

Tableau Data Sources: categories and the data source types presented by Tableau

Connecting to Data from a File

When connecting from a file, your selection is based on the file type.

From Excel

From the data connection pane, select Microsoft Excel from the list of options. After selecting this option, a window will open, enabling you to choose the file from a location. Because Excel was the connection type selected, the file options will be limited to Excel files. In this screenshot, a Windows Explorer window opens with the file types limited to Excel-specific files. From here, you will select a file and then click on the ‘Open’ button.

data connection pane: select Microsoft Excel from the list of options

After hitting ‘Open’, Tableau will bring the Excel file and all its contents into the ‘Data’ pane. Below is a screenshot presenting the data from the spreadsheet. In the ‘Data’ pane, Tableau presents you with the opportunity to transform the data as need be.

Tableau screenshot presenting the data from the spreadsheet

From a Text or CSV File

From the data connection pane, select Text File from the list of options. After selecting this option, a window will open, enabling you to select the file from a location. Because the text file connection type was selected, the file options will be limited to text, tab, and CSV files. In this screenshot, a Windows Explorer window opens with the file types limited to text files. From here, you will select a file and then click on the ‘Open’ button.

From the data connection pane, select Text File from the list of options

After hitting ‘Open’, Tableau will bring the text file and all its contents into the ‘Data’ pane. Below is a screenshot presenting the data from the spreadsheet. In the ‘Data’ pane, Tableau presents you with the opportunity to transform the data as need be. It is worth noting that Tableau is intelligent enough to understand the delimiting methodology. For example, this text file is tab-delimited. Tableau was able to determine this, and no extra steps were required.

Tableau will bring the text file and all its contents into the ‘Data’ pane

From a JSON File

JavaScript Object Notation (JSON) data can come from various sources, but is frequently associated with data pulls from a REST API (data from the web). In this example, this data is pulled from the NY Times API. Tableau works with JSON data files very well, translating the key:value pairs of data. As seen before, with Excel and text/CSV files, you select from the ‘Data’ pane JSON file. As before, Tableau prompts you to choose the file to use.

Tableau prompts you to choose the JSON file to use

One key difference when working with JSON data is that the dictionary data is nested in other collection objects (lists, dictionaries, etc). Tableau recognizes this and provides a secondary dialog box that will allow the schema level to reference. In Tableau, this is called the schema. In the screenshot below, the schema that holds the desired content is selected.

screenshot shows the schema that holds the desired content is selected in tableau

After the schema selection, Tableau makes the data available just like in the previous examples.

After the schema selection, Tableau makes the data available

Connecting to Data From a Server

Connecting Tableau to a database via a server requires more information. However, if you have the connection information available, connecting is nothing more complex than filling in the required information and then clicking ‘Sign In’. The difficult part can be first preparing the database for Tableau, but ELT solutions like Mitto can simplify the process.

In this example, the PostgreSQL server is selected. The process is very similar to the other server options (Oracle, SQL Server, etc.).  Once the server is selected, Tableau opens a dialog box requesting all the necessary information to connect to the server and database.

PostgreSQL server is selected as Tableau data source

After providing the connection information and clicking on ‘Sign In’, Tableau will attempt to connect to the database provided. After Tableau has successfully connected, a pane will open with all the tables in the database available for access.

Tableau pane will open with all the tables in the database available for access.

One compelling feature is the Custom SQL option. Rather than select a single table, you can write your SQL and Tableau will run the script and make that the data to access.

The Custom SQL option is selected in the screenshot below, and the SQL is pasted in the dialog box. After pasting in the SQL, click ‘OK’ and the SQL will be the data to use.

Custom SQL option is selected in this screenshot

Connecting to Data From a Tableau Server

One of the benefits of connecting to data from a Tableau Server is that the data has, more likely than not, been created and transformed for a prior report. This means that some of the heavy lifting (data sanitation, munging, etc.) was probably already done.

Connecting to a Tableau Server requires less information than connecting to a server, as shown prior. What you will need is the Tableau Server’s connection address. If needed, your Tableau Server administrator can provide this to you.

In this screenshot, after selecting Tableau Server as the data source, a dialog box opens where you will enter the address to the server. After entering the address, choose ‘Connect’.

Selecting Tableau Server as the data source resulting in a dialog box opening

After connecting, a new dialog box will appear with all the tables available for user consumption on the Tableau Server. Select the table desired and click ‘Connect’.

dialog box appears with all the tables available for user consumption on the Tableau Server

After connecting to the data, Tableau makes available all the fields in the tables, and any supporting tables used in reports (as this screenshot shows).

Tableau makes available all the fields in the tables

What’s Next

While this article covered many connection types, there are many other options available as well. Tableau provides a wide assortment of connection options to support just about any scenario you can imagine. For example, Server options can extend to cloud-based connections. PDFs can also be a data source. Tableau even offers an SDK for connecting to web data for API’s via the web data connector.

See what Zuar offers to companies using Tableau!

Tableau Data Extracts and Tableau Data Sources | Zuar
Tableau Data Extracts are quick and easy to manage, but if your organization hasa large data set that needs to be shared, a Tableau Published Data Source is anexcellent solution. Tableau Desktop allows the user to connect to and analyze[https://www.zuar.com/blog/tableau-analytics-without-vpn/] m…
How to Embed Tableau Dashboards in a Web Page | Zuar
Here’s how to embed Tableau dashboards with aTableau embed code, Tableau Javascript API, and iframe + Tableau share link.
Tableau Dashboard Actions Use Cases | ZUAR
Dashboard actions, parameters, and filters are some of the best tools you canuse in Tableau. They give you a way to transfer the control of the analysis toyour end-users, which is critical in data visualization [https://www.zuar.com/] to help allow discovery for your users and also to make it eas…