Why Vizioneer?

My photo
Atlanta, Georgia, United States
The "Vizioneer" comes from mashing two words that have shaped my world for most of my adult life - Engineer and [data] Visualizations (or Vizes to those who know what's up). Graduating from first from Oglethorpe University in Atlanta, followed by Georgia Tech with my Bachelors and Masters in Civil Engineering, all of which taught me to think through anything and everything - problem solving, "engineering" solutions, teaching to the "ah ha" moments - is what I love to do. In 2010 that investigative, engineering mindset intersected a job change and a plunge into the world of Data Analysis. In the search for the next great thing I stumbled on to a data visualization and dashboarding product called Tableau software and things just took off. So now I guess you could call me that engineer with the sweet data visualizations - or just "The Vizioneer" :)

In 2013, I joined the incredible team at Slalom, focusing on Tableau and it's been an amazing experience. Recently in 2014, I was honored and humbled to receive Tableau's highest recognition of being named a Tableau Zen Master. Follow along to see what happens next :)

Thursday, September 3, 2015

Connecting the Tableau Server Background Jobs Table back to Content

There's some amazing work happening all around us.  One of the greatest things about Tableau is the awesome community, and when someone discovers something it's not long before the world hears about it.  

Today, I have the pleasure of introducing you to Mark Jacobson, a Slalom Consultant out of the Silicon Valley office.  Mark's connected some dots in the Tableau Server Postgres DB repository data model for us, allowing us to better understand how extracts are connected back to their workbooks - something that's really valuable if your Server is overburdened with extract jobs.  Check it out!

Connecting the Tableau Server Background Jobs Table back to Content

If you’ve ever tapped into the Postgres DB that lies at the heart of Tableau Server, you’ll find that it is a gold-mine of data about how your users interact with and experience your Tableau Server. Statistics on everything from how frequently users access workbooks, when they publish content and how well your server is performing can be gleaned from this data. And what better way to do that than by hooking up Tableau directly to get these insights.

Lots of posts have been written about how to access these tables and Tableau has published a data dictionary about what you’ll find within. There have also been numerous contributions from the Tableau Community showing what can be done with this data. Jeffrey Shaffer, who runs the amazing Tableau Blog data + science, has compiled a list of these on his Tableau Reference Guide.

Much of my client work is focused on helping organizations understand what’s going on inside their Tableau Server platforms. On a recent assignment, I had the challenge of needing to understand what was causing my client’s Extract Refresh jobs to experience long delays. I knew that by tapping into the background_jobs table I’d be able to find my answer. 


To see where the delays were, I created a heat map detailing the delays between the scheduled start time and the actual start time of each job. This showed me where the bottlenecks were but one piece was still eluding me. Specifically, I needed to connect the performance of each refresh job back to the workbook or datasource that was experiencing the delay and then to the project where it was located.

Looking for a Solution

At first this would seem like an easy task. I would just join the background_jobs table back to the workbooks table or datasources table on a common ID field and go on with my analysis. That was until I looked at the contents of these tables. The background jobs table does not contain a workbook_id or datasource_id like the other tables within the workgroup schema.

It does contain a “title” field which has the name value of the content and a “subtitle” field that displays either “Workbook” or “Datasource” if the background job is related to an Extract refresh but this is not unique.

What happens if you have a workbook in 2 different projects with the same name? How would you know you were getting the job results of the right workbook? This was indeed my problem so I began to look for a more unique way to link these tables. After all, Tableau Server has to be able to make this association so it can perform the desired operation, right?


Discovering the Link

I knew the answer had to be within the background_jobs table, so I went digging. Low and behold, I found my answer within the “args” field. For a Workbook’s Extract Refresh job, the “args” value looks something like this:

---
- Workbook
- 87994
- (string masked for confidentiality)
- 75596
- null

Could one of these values turn out to be the workbook_id or datasource_id I was looking for? Turns out the ID value after “Workbook” is the workbook_id value that will tie back to the workbooks table. Having found the workbook_id, I now needed it in a format that I could use in a join. The next step requires some custom SQL and a little knowledge about regular expressions.

Using the following statement, I was able to parse the “args” string into an object_id:

cast(split_part(
(regexp_replace(args,'---','')),'- ',3
) as integer) as object_id

The statement replaces the dashes and splits the string into its own field which is then cast into an integer so it can be successfully joined with either workbooks.id or datasources.id inside of Tableau’s Data Source editor.





Success! I now had a version of the background_jobs table complete with the ID of the object being refreshed that I could link back to my data!

If you’re like me and you’ve been stuck searching for way to do this, I hope you enjoyed the post. I’ve created a .tds file and hosted it on GitHub so you don’t have to recreate the SQL if that’s not your thing.

Happy hunting!


Mark Jacobson
Consultant, Slalom Consulting
Silicon Valley, California

4 comments:

  1. Gorgeous heat map! Someone just sent this to me as an example of the "best use of a heat map I've ever seen."

    ReplyDelete
  2. This is such a great blog. you really covered it all. Thank you for sharing such an important information. Hope to get some more information in future also.
    Husband Wife Dispute Specialist
    Career or job Problem Specialist
    Love Vashikaran Specialist in India.
    100% satisfaction guarantee Call @ +91-9815872813.

    Regards,
    Shri Mukesh Aghori Ji

    ReplyDelete
  3. This is my testimony about the good work of a man who helped me....My name is Alex Jeffry ... My life is back!!! After 8 years of marriage, my wife left me and left me with our three kids. I felt like my life was about to end, because she was my real lover, and was falling apart. Thanks to a spell caster called Dr.otonu who i met online. On one faithful day, as I was browsing through the internet, I was searching for a good spell caster that can solve my problems. I came across series of testimonies about this particular spell caster. Some people testified that he brought their Ex lover back, some testified that he restores womb, some testified that he can cast a spell to stop divorce and so on. There was one particular testimony I saw, it was about a woman called grace,she testified about how Dr.otonu brought back her Ex lover in less than 72 hours and at the end of her testimony she drop Dr.otonu e-mail address. After reading all these,I decided to give Dr.otonu a try. I contacted him via email and explained my problem to him. In just 3 days, my wife came back to me. We solved our issues, and we are even happier than before. Dr.otonu is really a talented and gifted man and i will not to stop publishing him because he is a wonderful man...If you have a problem and you are looking for a real and genuine spell caster to solve that problem for you. Try the great Dr.otonu today, he we be the key or answer to your problem. Here's his contact: (otonuspelltemple@gmail.com) or (otonuspelltemple@yahoo.com) Thank you great Dr.otonu..

    Contact him if you have the following problem:

    (1)If you want your ex back.

    (2) If you always have bad dreams.

    (3)You want to be promoted in your office.

    (4)You want women/men to run after you.

    (5)If you want a child.

    (6)You want to be rich.

    (7)You want to tie your husband/wife to be yours forever.

    (8)If you need financial assistance.

    (9)Herbal care like HIV/AIDS/HERPES.

    (10)Help bringing people out of prison.

    (11)To make you win your case in court.

    Contact him today on:

    (otonuspelltemple@gmail.com) or (otonuspelltemple@yahoo.com) try him and see the good news to the success and happiness of your life.

    ReplyDelete
  4. A debt of gratitude is in order for giving such a valuable data. Want to get some more data in future too.

    Top Astrologer Service London UK | Top Astrologer Service in London UK | Top Astrologer Consultant UK

    ReplyDelete