One of the additions to Tableau Server version 8 is a new suite of history tables.
These little bundles of joy contain someof the same information that you could get from the old style _views that have been available for a while, but they allow you to retrieve what you want in a much more convenient manner. The new history tables also capture more events – and more is always better, right?
For example, if you wanted to monitor users logging on and off your Server in v7, you’d have to watch the _http_requests view and parse out the controllers and actions fields looking for very specific strings. Certainly doable, but kind of a pain.
In Tableau Server 8, you’re going to get a specific event type you can look for – like “Login” and “Logout”. That’s it. Easy.
One thing that’s important to point out is that these new tables focus on things that happened on the server.
You can use the events being captured to monitor things like:
- A user executing a a viz
- An admin adding a user or group to your server
- An admin adding a multi-tenant site to your server, then suspending the site so no one can use it yet.
- A user adding a comment to a viz and then downloading the workbook itself
The tables are not going to give you “organizational information” about objects in your database. For example, the old style _views are built to communicate relationships between objects – like “which users are in group <whatever>” or "which views are a part of a workbook":
See the handy relationship in the tables above relating worksheets to workbooks?
The “event” tables don’t attempt to re-address this need. They focus on telling you an action occurred against an object (user, view, schedule).
It’s likely you’ll up a combination of the old style _views and the new history tables to get your work done.
Read this – It’s important
I’m going to explore this functionality with you, but understand I’m not trying to create “official” Tableau documentation. I’m literally going to show you things you could figure out on our own if you wanted to take the time to do so.
Read this too, it’s equally important
The history tables are a work in progress. Not everything I’m going to point out to you 100% baked. The history tables still probably won’t solve every single problem you want them to, and the information below is likely to change as the Tableau developers add and refine functionality based on our feedback – such is life.
And now, we begin
Unlike the old-school historical views, the Tableau history tables save data for a long time – by default, records are saved for 6 months (183 days). These records are also NOT deleted when you do a backup or cleanup with the tabadmin tool. This is good.
On a very active server, you could end up saving a heck of a lot of data in your system database, though So, it’s important to know how you can change the default to a lower value (or a higher one, maybe):
tabadmin wgserver.audit_history_expiration_days <# of days >
Next up, your historical table list
The list below shows you all the tables you have access to in the Tableau PostgreSQL database. Not every table is populated with data yet (remember, “work in progress”). I’ve defined the broad function of each of the tables that currently does get populated. We’ll go “in-depth” on each later.
The two most important tables are historical_events and historical_event_types. The former contains a row for each thing that happens on your server while the latter tells you what happened. You’ll JOIN these two tables together using the appropriate primary key and foreign key fields. You’ll use these two suckers in nearly every query you write to do work with historical data.
Based on the fact there are lots of tables which potentially need to be joined, an ERD is probably a nice thing. I pointed Microsoft Visio at our collection of tables and asked it to create a data model diagram for me. I’ve pasted it below as an image, OR you can download the Visio file itself along with the image. Use Visio Reader to open it.
That’s it for now. In my next post we’ll dive into the events and event_types tables and start creating some reports. Then, we’ll start pulling in some of the other tables, too. Be strong, Tableau Server Jedi, be strong.