I was asked this morning about my favorite features in Tableau v10.1 (currently in beta) and one of them is the native support for parsing JSON files. I've got two reasons for this 1) it's evidence of some interesting new Tableau developments and 2) we can monitor Tableau's own log files using Tableau faster than we can using the Performance Recorder.
1. Automatic LOD Expressions!
Honestly, the first reason why isn't so much the JSON parsing as it is what Tableau does under the hood when it parses a JSON file that has multiple levels of hierarchy:
Notice that the Elapsed-Sum per v calculated field is in italics, indicating that it's a Tableau generated field. What Tableau is doing is automatically creating a Level of Detail Expression based on the level of the hierarchy I picked when connecting to the file. To me this is a harbinger of new things to come in future releases where Tableau could autogenerate other useful calculations to deal with data that arrives at different grains, for example so we don't have problems with replicated values coming from joins.
2. Pulling Queries out of Tableau Logs
When this new feature first showed up in the betas the first thing I tried it on was the Tableau logs. I'm not the first to post about this idea, Mark Jackson just did a few days ago about using the JSON connector for parsing Tableau Server logs. Performance Recorder is great but takes awhile, my dream has been to be able to have a viz and parse the log to show queries as I go, and I got inspired this morning to put together a quick viz-experiment (vizperiment), here it is:
There's a parameter to control how many minutes back into the log file you want to go (from current time) and a Gantt bar, bar chart, and text table showing the queries and their timings. In this case the queries we're seeing are TQL, Tableau's internal query language used for Tableau data extracts. The whole thing only took a few minutes to put together, I had to turn the log timestamp into a real datetime field and make sure I had the math right for the Gantt bar lengths. The dashboard explicitly filters for the end-query tags that have the information I wanted to display.
Any time I want to look at the queries now I can open the workbook, edit the data source to point it at the appropriate log file, and press F5 to refresh. Here's a link to the json log viewer.twb file for your own use & experimentation.