In the earlier article, we have talked about how to install Tableau Desktop on your system. If you have not followed that article, I would recommend you go through that and install Tableau Desktop on your respective systems. In this article, we are going to talk about tableau data connection using different data sources to the tableau desktop.
In this article, we are going to learn the following-
Data sources are nothing but the file where your data lies. It can be an excel sheet or a CSV file or a text file or some databases. The data source can be either on-premise or it can be on the cloud also.
While connecting a database to Tableau desktop you need to have valid permission. If you are looking to connect a database to Tableau desktop you need to authenticate yourself. While authentication, you’ll have to provide the server name, the database name, and the user ID and password. If details will be correct then you will be able to access the data on the Tableau desktop.
The best thing about Tableau is, that tableau connect data sources that are of various types. You don't have to look for any third-party apps to connect to these data sources. Some of the popular Tableau connect data sources are -
Apart from the available data sources, you can also connect to other data sources that can’t be connected directly. The connection can be done through a JDBC connector or an ODBC connector. If these are not available, then you can download the data in either an Excel sheet or a CSV file and can connect it to Tableau desktop. The other option is, try getting the data in that data source where the connection is directly available. And then connect to the data source to the tableau desktop.
If you will open Tableau desktop, in the left-hand pane, you will find a blue strip bar. There you will be having multiple data source connection options. In the newer version of Tableau Desktop 2019, you will find four sections available over there-
If you have the data available on the Tableau server then you can select the first option. Here you will be asked to authenticate yourself to Tableau server. Just provide your server address and username and password and click on sign in. After that, all your data sources available on the Tableau server will be shown to you. Now just select the data source on which you want to work and get started.
In the second option to a file, all the file related data sources will be shown to you. It can be an excel file, a CSV file, or a text file, or a JSON file, etc. This option can also handle a statistical file or a spatial file or even a Microsoft Access file.
In the third option, to a server, you can connect all those data sources which are on the server. For example, it can be a Microsoft SQL Server, Oracle server, Amazon, Salesforce, Cloudera, and more. This means all the data sources which are available on the server can be connected with this option. If you will click on more options, all the list of available data source connections will be available to you. Now you can simply search for your required data sources and click on it. Once done, it will ask you to authenticate yourself in the form of a pop-up option. Just authenticate yourself and all the data will be available for you to access and work.
For example, if you want to work with Spark data, simply search a spark and you will find the Spark SQL option available over there. Once you will click on that, it will ask you to provide the details in the form of a pop-up option. The details can be like server name, username, password, port number, and more. Just provide the details and you will be able to access all the data available on the spark SQL on which you have access.
There are chances that for some of the data sources you might need to install the drivers also. For example, for Oracle and Spark SQL connection you have to install the respective drivers. For that, you can visit their respective website and can download their respective drivers for Tableau to connect. Once downloaded, you can simply install it and then start using it. All these drivers are completely free.
Tableau Online Training & Certification
To connect an excel sheet to Tableau desktop just follow the option to a file and select Microsoft Excel. This will open a popup browser for you. Here just select an excel file that you want to open.
Now, you will be shown a new you interface where the details about the excel file will be shown. As you can see in the below image, an excel file with three tabs is shown. These tabs are the tabs from an excel file itself. Those are orders, people and returns.
Now whichever tab you want to access, just double click on it. As you can see in the below image, I have accessed the order sheet. The details of the orders sheet are now showing on the screen. You can do the same just by dragging that sheet also.
Under the connections option, you will find an option for use a data interpreter. This option is very useful for all the data which is not in the proper format. If you will click on that checkbox option will automatically clean the data as required. If you are not satisfied with the data cleaned by Tableau you can revert back also as you want.
Tableau Online Training & Certification
But this is really an interesting feature for all the data which are not in the correct format. Tableau will automatically take care of all those formattings of the data. It can remove illegal character's null values and others. Although it is recommended to do all these things on your own but if you have not done so far it will take care of all these up to some extent.
Here my suggestion is to review the changes Tableau has made for you. The changes should not be at the cost of data loss.
In the data preview pane, you can preview the data. It will show you all the columns from your Excel sheet along with 1000 records by default. If you want more records to be shown, you can click on the right arrow button. Along with the column name and the data it also shows you the sources of those columns and the data types of those columns. This is a really helpful feature to get an idea about the data before actually working on it.
If you want to change the data type of these columns you can do from here. You can also alias some of the records as needed. By default, these columns will be sorted on the basis of the data source order. If you want to change the sorting of the data you can select different options from the dropdown shown over there.
To connect a CSV file or a text file you can select text file option from a file section. As we know the difference between a CSV file and a text file is the separator. And so, to connect both the file we have a single option called as a text file. Just click on that option and you will be getting a pop-up option to browse your CSV or a text file.
Rest all the options will remain the same as we had in the section of an excel file. You will get the same option we had for an excel file in this CSV or a text file.
Here in this section we will discuss fixing the ‘tableau unable to connect to the data source’ error.
The best way to solve ‘tableau unable to connect to the data source’ error is to simply re-save the existing workbook by utilizing web authoring and then embedding the credentials.
Tableau Online Training & Certification
In this article, we have talked about how to connect different data sources to the Tableau desktop. I have also shown you about tableau data connection how you can connect an excel sheet, a CSV file, and a text file to Tableau desktop. For a server-based database connection, you need to first authenticate yourself as we have done in the section of spark SQL. As said earlier, you might need to install some drivers as well for some of the database connections.
I would recommend you go ahead and connect with these data sources to Tableau, and let us know if you will get some issues while connection.
A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.
MS SQL Server
Receive Latest Materials and Offers on Tableau Course