[Update: A fast solution has been posted
http://vizdiff.blogspot.com/2015/07/replacing-data-source-fast-way.html
]

In my work, after building a workbook based on a data source (a file or a database connection), I extract the data and publish the extract to the server as a data source. By replacing the original data source with the server instance, I find my viz broken.

Actually this breaks everything. As far as I know, the broken pieces include:
- color settings
- aliases
- formats
- quick filters and their settings
- sort orders
- sets
- parameters
- groups
- calculated fields
plus je ne sais quoi.

I am not alone. There are a lot of reports on the subject in the last 3 years:
http://community.tableausoftware.com/thread/151396
Yet a good and elegant solution is to be found.

Here I am trying to analyse the cause, present some workaround and give the ultimate fix to this nagging problem.

The Cause

A viz or a visual app is composed of three main parts:
- data source (the original data set)
- meta data
- rendering (graphing or charting)

Data source and rendering are easy to understand. Then what is meta data or metadata?  There are formal and academic definition to it in Wikipedia. In our specific case, the metadata includes everything we manually add on top of the original data. See list above. Metadata could be composite data (such as calculated fields, sets, groups) or annotations (formatting, aliases, properties, colors). Metadata is the value added by us human data analysts. It is the basis for rendering. Simply put, we dream up a Viz, create metadata and instruct machine to do the rendering.

When replacing the original data source, Tableau strangely takes away the metadata with it! Without the metadata, the viz is broken. That's why we need to rebuild all the metadata. How painful!

The Workaround

The workaround consists of two steps. Load the new data source first. Before replacing,
1.Load every worksheet and dashboard by clicking each tab and view the rendering in integrity.
This will preserve annotation part of the metadata: colors, aliases, formats, filter settings etc. See also
http://community.tableausoftware.com/docs/DOC-5359
http://kb.tableau.com/articles/Issue/quick-filters-change-to-multiple-values-list-after-replacing-data-source

2.Copy over composite/derived metadata to the new data source.
See more details in comments below. Hold your control key when copying. This saves you the effort of recreating groups, sets, calculated fields and parameters etc.

After the above two steps, proceed to replace the data source by the new instance. It may or may not fix all your problems because I can't enumerate all the elements that might be broken. Inspect your viz carefully after the replacement.

This should relieve a bit of your pain in migrating data sources. It is still quite painful nonetheless.

The Ultimate Fix

The ultimate fix can only come from Tableau the company. In its current product design,  they treat the metadata as part of the data source. That's why when replacing data source, the metadata is gone as well.

In my opinion, the metadata is an integral part of the application and not part of the data source. The metadata must be preserved and retained. In this way, replacing data source won't affect the metadata. The metadata will be recreated automatically. The operation will be smooth without any additional human intervention. This is the kind of elegant solution I am expecting.

This issue has accumulated enough votes in community ideas (such as this one) and bug reports so that it must be time to fix it. [Update: a new bug report is filed under case #01205225 ]
13

View comments

(Refresh the page if you want to view the gif image multiple times. Or go to Tableau Public and click the button at the top-right corner.)

Jake and I collaborated on a dashboard. He told me that he learnt a way to create an in-place help page in Tableau. He first saw it at a conference somewhere and couldn't recall who the speaker was. So I am blogging here about it but the credit goes to somebody else. If anyone knows who the original creator is, leave a comment below.

The key idea is to float a semi transparent worksheet on top of the dashboard, where a help text box is strategically placed on top of each chart. This way, we can explain how to view each chart and what data points are important, etc. This worksheet is collapsible by a show/hide button. 

Below I would like to show how this worksheet can be constructed.

1. Sheet with a single data mark.

  • Double click the empty space in Marks panel and add two single quotes. Make the null pill a text label. This creates a single null mark.
  • Set the view as "Entire View"

2. Create an show/hide button

  • Go to the target dashboard
  • Drag a floating vertical container to the dashboard, making it cover all the area of interest.
  • Drag the Single Null Mark sheet and drop it into the above container. Hide the sheet title.
  • Create an open/close button for the container and place the button at the top-right corner.

3. Add annotations

  • Format the sheet background opacity as 70% in the layout manager             
  • Select area annotations and place them anywhere of interest. 
  • Write help text and format it to highlight important messages.  
  • The text can serve as functional guide and/or insight guide.

Here is an example. Feel free to download the workbook and explore. Click the "i" button at the top-right corner to view the in-place help. 

0

Add a comment

Blog Archive
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.