21 Jul 2016

How to Connect Tableau to Google Products

Ryan Smith

Google and Tableau's relationship has grown in the past year and now Tableau has even more integrated features to support Google products. Tableau 9 offers three different connection types for Google products: Google Analytics, Google BigQuery and Google Cloud SQL.

I have put together a quick guide on how to connect to these services and will take a look into what the near future holds for Google and Tableau's integration.

Google Analytics

Web Analytics is an increasingly growing field that gives organisations an analytics edge. It provides analysts with a view on how the outside world interacts with content from companies on a daily basis. Google Analytics is Google's web analytics tool, with API that connects with Tableau to import web page data and stats directly.

Connecting to Google Analytics is simple: select the option in the Server Connection menu then sign in to your Google Analytics account. Once connected you will be in the Data Connection tab, wich is vastly different to the standard page.

Figure 1. Google Analytics Data Connection Page

Figure 1. Google Analytics Data Connection Page

Here you are given the choice of which site to get the data from and to apply any filters to the imported data. The next step is one of Google Analytics' biggest drawbacks: you must select the dimensions and measures you would like to import with a limit of seven dimensions and ten measures.

Tableau Add Dimension and Measure

Figure 2. Dimension and Measure selection

The dimensions and measures available are organised into categories for ease of use. Once you have selected your desired fields, just click on the New Sheet tab, and that will create an extract of your selected data. Now your selected dimensions and measures will be available as normal, and you can begin to design your visualisation.

Selected dimension shown in data pane Tableau

Figure 3. Selected dimension shown in data pane

There is one thing to be wary of when deciding which fields to include in your extract: when a dimension or measure contains no data, an error will occur (as you can see below), and that field will have to be removed to create the extract required.

Tableau Error message when no data is available

Figure 4. Error message when no data is available

Google BigQuery

BigQuery is Google's low-cost analytics data warehouse. BigQuery can support data on a Peta-Byte scale and a pay-as-you-go system in order to keep costs low. BigQuery is a powerful Big Data analytics platform used by all types of organisations, from startups to Fortune 500 companies.

Connecting to BigQuery is easy using the inbuilt wizard. Select the "Google BigQuery" option in the Server Connection menu, then log in to your Google account for your BigQuery.

Now you're logged in, you will see the Data Connection tab and be able to select your desired Project from the drop down. If you want to see BigQuery's potential but not load any data, you're in luck, as the data warehouse comes with sample data for you to play with.

Tableau Data connection tab options

Figure 5. Data connection tab options

I've connected to the sample Wikipedia data and, as you can see below, our data appears no differently to when connected to an excel sheet or another server connection. Now we can simply drag and drop our dimensions and measures to create visualisations.

Tableau Selected dimension shown in data pane

Figure 6. Selected dimension shown in data pane

Google Cloud SQL

Google Cloud SQL is a fully managed database service that makes it easy to set-up, maintain, manage and administer your relational MySQL databases in the cloud. Hosted on Google Cloud Platform, Cloud SQL provides a database infrastructure for applications running anywhere.

Connecting to Google Cloud SQL server is different to the previous two connections and requires a little bit more information, as you can see in Figure 7, you will need the server address along with a username and password to access the server. 

Tableau Connection window for Google Cloud SQL

Figure 7. Connection window for Google Cloud SQL

Then you will again be shown the Data Connection tab, where you can select one of your databases and the tables you would like to use. Drag and drop these into the table pane to create your schema and you're good to go. Now you're all set to visualise your Google Cloud SQL database using Tableau.

Tableau Data connection tab options for Google Cloud SQL

Figure 8. Data connection tab options for Google Cloud SQL

Future Features

As I said earlier, I will look into the not-so-distant future to see what Tableau and Google have in store. Although not officially out and currently in beta, Tableau 10 has a brand new feature that allows direct connection to Google sheets.

The connection is very similar to that of Google Analytics or Big Query, simply logging in using your Google account details and having the choice of your sheets, as shown below.

Tableau Sheet selection page for Google Sheets

Figure 9. Sheet selection page for Google Sheets

Select a sheet and click connect, once again you will be taken to the Data Connection page. This will look very familiar by now, but this time you'll have a new option: "Data Interpreter". This feature comes with the Google Sheets connector allowing Tableau to clean your sheets before using it for your visualisation.

Tableau Selected dimension shown in data pane

Figure 10. Selected dimension shown in data pane

Figure 11 shows the dimensions ready to use.

Tableau Dimensions appear in data pane

Figure 11. Dimensions appear in data pane

Google has quite a repertoire of features within Tableau, and the list of integrated features is growing, as is their relationship. It's not a coincidence that Google Cloud Services was a platinum sponsor at Tableau on Tour, held in London last month.

Ryan Smith

About the author

Ryan Smith is a Graduate Analytics Consultant at Concentra. He studied Computer Networks at the University of Portsmouth and has a love of all things technical combined with a growing love of data. He believes that, together, these two can bring great insights into fascinating and exciting areas of everyday life. Sports is his main passion, and he enjoys visualizing all types of data from Football to MotoGP.

Related to How to Connect Tableau to Google Products