Tableau PostgreSQL Server Basics

by Harry Osborne

Tableau is most often seen as a data visualisation tool that requires data to be inputted to become useful. Whilst initially true, Tableau Server collects a vast array of data whilst it is in use, allowing businesses to access their own metrics, and consquently visualise their own data in different ways to inform internal business decisions.

This wealth of information is available inside the Server's PostgreSQL database (an opensource database option), located in Tableau Server's "Repository". All that is required is a level of credentials, and a little bit of knowledge on how to access these tables.


To connect to your company's PostgreSQL database, follow these steps:

1. Open up Tableau Desktop, and when propeted to connect to a datasource, move to the "To a Server" option and select "PostgreSQL"

2. Enter your Tableau credentials, including the Server, Port, Database and login details

3. Hit sign in and start exploring!

The credentials screen when selecting PostgreSQL

Once you have established this connection, Tableau will automatically populate the Tables section of the Data Source tab with the tables available inside Tableau Server. These are common for every instance of Server, a point worth remembering (I will explain why later on). These can look daunting (particuarly if you haven't seen any of this before), but there are detailed logs that explain the breakdowns of each table, and how they relate to one another. My personal choice is this one on Github - this gives afield-by-field description, as well as explaining the primary and foreign keys in each table.

If this still looks a bit intimidating (as it did for me), there are options for pre-built and pre-populated Dashboards. Tableau Server Insights have been a discussion point on Tableau's forums for several years now, and various views and connections have been established to help businesses analyse their own data without needing to get too involved in the backdoor work. This link takes you directly to the founding post (where the concept is best explained), but if you want to download the built joins between the various tables, this link from Github again gives some broad but useful breakdowns that you can download and connect.

The beauty of every Server having identically built PostgreSQL databases is that these downloadable files are viable for every Server, hence their immediate usefulness. Having noticed this, a couple of former TIL employees began "Project Griffon" to help businesses develop these insights, providing links and pre-built Dashboards to answer certain common questions. You can find those here.


I wanted to explore Dashboard uploads, views and device types, so I delved into the "views" and "views_stats" tables (joined by a common "ID" field). These contain a wealth of data, from time fields through to detailed view-by-view counts and records. Without straining too much, I was able to build this view entirely from PostgreSQL inside TIL's Server!

An example Dashboard I built from PostgreSQL