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.
Connecting to Data from a File
When connecting from a file, your selection is based on the file type.
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.
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.
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.
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.
From a JSON File
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.
After the schema selection, Tableau makes the data available just like in the previous examples.
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.
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.
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.
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’.
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’.
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).
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!
- Transport, warehouse, transform, model, report & monitor. Mitto gets data flowing from hundreds of potential sources into a single destination for Tableau.
- Our Tableau-certified consultants regularly assist customers with Tableau installation, Windows and Linux upgrades, admin best practice training, server performance optimization, and Tableau server deployment.
- Read our other Tableau-focused articles, such as...