Tableau and Backwards Compatibility

Introduction

I definitely have done my fair share of Tableau hacking through the years. I normally don’t publish what I do to modify the XML commands inside the *.twb file, however, because the methods are not always guaranteed to work. I also do not want to impact the spirit of Tableau – which is to keep things simple, safe and reproducible. I also do not want to cause any problems for anyone in their work.

Unless the user has a fair amount of XML experience and is really comfortable with making changes, altering Tableau *.twb files can be a dangerous task to undertake. It is really easy to corrupt a *.twb file. So if you decide to try this one, be sure to make a backup file of your original *.twb file before making any changes. You can now consider yourself forewarned.

Motivation

Sometimes I decide to break the rules a little when there is good reason. In the past couple of weeks, I have been asked the same question on a number of occasions, which is why I am motivated to write this article.

The question is this: Can I make a version 9.3 Tableau file (*.twb) backwards compatible so that it works with Tableau Desktop 9.2?

This question has arisen for a couple of reasons. First, some users popped forward to Desktop 9.3 when the Tableau server version they were using was 9.2. They did a lot of work in 9.3 only to find that they couldn’t publish those workbooks/dashboards on the version 9.2 server. Also, some people are participating in Tableau Beta testing and they had some work completed in version 10 that they wanted to bring back to version 9.2 for the same reason.

Since I had to show a few different people how to do it, I thought I’d write a quick note to share the technique.

Backwards Tableau Compatibility

I’m not on the Tableau development team, but I’ve written enough software to understand the issues with compatibility. In fact, I wrote an extensive XML schema to verify input into a very sophisticated model that integrated groundwater and surface water flow. Having experience like that allows me to readily understand the XML files developed by Tableau.

When Tableau releases a new version, say going from version 9.2 to 9.3, this usually means that new features are being added to the software. What this means is that new XML fields (parents and children elements) are added to the the software platform and these elements are written to and stored in the *.twb file if the user has activated them in their Tableau workbooks.

When a user implements a new feature or object in 9.3, for example, it really is not possible to go backwards to version 9.2. The reason for this is obvious – the software feature described by those XML tags were not available in 9.2.

If you try this, the Tableau 9.2 XML parser will not understand the meaning of those elements (because they are not in the XML schema) and you will get some error message. The message will inform you that there is a problem reading the *.twb file. It has been a long time for this to have happened to me, so I can’t remember exactly what the error messages look like.

To summarize, if you try to migrate a 9.3 file that has new features back to 9.2, you will not be successful. The technique I am about to show will only work if the features you have in your workbook were available (and unchanged in definition) in the version you are trying to revert to. The good news is, in many cases, backwards compatibility will be possible.

The Backward Compatibility Technique

For a lot of the Tableau work we do, we probably have not implemented the newest features in our workbooks when a new release is issued. It normally takes us some time to discover these things and begin using them. So if you find yourself in this situation, there is hope that you can use this technique successfully.

Figure 1 shows the first 12 lines of a version 9.3 *.twb file I randomly picked from my working files. If I try to open this file in version 9.2, I get the error message shown in Figure 2.


Ver9.3

Figure 1 – A *.twb file from Tableau version 9.3. I want to move this backwards to version 9.2. Click the picture for an exploded view to see the text details.


Newer_version

Figure 2 – The error message you receive when trying to open a newer *.twb in an older version of desktop.


My goal is to push this 9.3 *.twb file backwards to version 9.2 so I can publish it on a 9.2 server. There are only two things I need to do. Please refer to Figure 1 to see the content of the line numbers I refer to below.

Steps
  1. Swap out lines 3 and 4 and replace them with the equivalent lines in a version 9.2 file.
  2. Change the version number from 9.3 to 9.2 in line 10.

After the changes are made, my 9.3 file now appears to be a 9.2 file, as shown in Figure 3. The Tableau XML parser will read the file and believe that it was created in version 9.2. If you do not have any new features in the *.twb file that originated in version 9.3, you will be fine and the file will render in Tableau.

Ver9.2

Figure 3 – A *.twb file that was originally created in Tableau version 9.3 but has been updated to look like a version 9.2 file. Click for exploded view to see the details.


Since I am a Tableau Beta tester, it is not uncommon for me to have multiple versions of Desktop installed. For this reason, I have had to use this technique recently to convert some version 10.0 files back to version 9.2 for publishing. It is easy to make a mistake of picking a more recent Desktop version only to realize later on that you need to publish your work in an older version on Tableau server or Tableau public.

Multiple Data Sources

If you happen to have multiple data sources in your workbook, you will have to make changes like those described above (#2) to make sure all the datasources appear to be version 9.2. You can search the *.twb file to find the word “version” to find these other occurrences and then make the required changes.

Final Thoughts

Altering the Tableau workbook files (*.twb) can be dangerous, so users should beware! Having the knowledge to do so is a benefit, however, and can be used to get you out of a jam some times and can help you avoid having to rebuild a workbook and dashboards in the earlier version. This technique may save you some serious time one day.

Update – The Next Morning

I awoke today (6/10/15) to a Linked-In update that made me laugh. Yesterday another article was published on this same topic on the Tableau Blog. The author is the incredible Jeffrey Shaffer, and he had to kick my a$$ by publishing a web-based tool that you can use make these changes for you!

Click here for a link to this article on his awesome website. Several days later, Jeffrey wrote another article that explains in detail how his tool works. Click here to read that article.

The Story Behind the Article

Once I saw this Jeff’s work, it got me thinking about what motivates me to write articles like this. To help you understand how things like this come into existence, I’m going to show you the story behind the article.

Early on 6/8/16, a colleague of mine in Arizona wrote me a question as shown in Figure 4. His name is Michael Sandberg and you must check out his awesome and beautiful data visualization blog that focuses on Infographics.

Figure 4 – The original question from Michael Sandberg regarding version compatibility.


I wrote him a response later in the day as shown in Figure 5.

Figure 5 – My original explanation to him that was expanded into this article.


Sometime after that, he tried the method and it worked for him as shown in Figure 6.

Figure 6 – Michael’s kind words were motivation for me to write this article.


Those simple three words Michael wrote to me inspired me to write this piece.  That is how these types of articles happen. So thank you Michael for your kind words and your great work on your blog.

Backwards Compatibility in Alteryx

Click here to read a new article by James Dunkerley that discusses backwards compatibility of Alteryx files. I know this will come in handy for me as I started using version 10.6 yesterday.

 

2 thoughts on “Tableau and Backwards Compatibility

  1. Pingback: Adjusting Alteryx Files For Different Versions… | James Dunkerley's Blog

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.