Data Mapping For Everyone

Nov 15, 2023

Klaus Schulte

I’m just coming back from Vizit Berlin, a two-day-event organized from the Tableau community (thank you Sarah, Heidi, Annabelle & Tore) for the community. It was so great to reconnect with old friends and make new friends. I also had the pleasure to give a presentation on the first day, where I introduced two ways to decouple Tableau’s Data Mapping feature from the accelerator workbooks (the intended use case), and therefore allow everyone to use it.

Data Mapping: What is it?

What’s data mapping? I personally consider data mapping to be one of the least used features in the product at all. And when I asked people, who was actively using or who has ever used it, only few hands went up. Part of the reason is probably that the feature is designed to be used with Tableau’s accelerator dashboards, and remains invisible when working with the default product.

Replacing Data Sources

Replacing data sources has always been one of the not-so-fun-things to do in Tableau. Most of the time, something breaks and you can quickly end up in a big mess. To avoid this, I for my part use two different approaches:

  • In a more strategic approach: Prepare the new data source really well: match field names and data types and then do the replace data source stunt.
  • In a more chaotic approach: Replace data source right away, and then fix broken fields with the replace references feature.

When accelerators came up, Tableau needed something to support users in this process. The data mapping feature was introduced in version 2023.1 and uses my second approach (kind of), but wraps it together in a nice user interface.

  • It lists all fields in the old and in the new data source,
  • gives even context to these fields like data types and domain values,
  • then maps fields to fields from the new data source,
  • changes the data source,
  • and replaces all references from the old to the new fields when hitting “Replace Data”.

That’s already a giant step forward!

Try Yourself!

If you have never used the feature, go and try it out:

  • Open the accelerator gallery directly from Tableau Desktop
  • Find a data mapping enabled accelerator (check the “data mapping enabled” option), download and open workbook.
  • You’ll then see the data mapper launching in the bottom left corner of the window. Select “Get started” and you will be prompted to the user interface (you can later also open it from the data menu at a later point).
  • If you haven’t already, you can add the new data source directly from the data mapping interface, or select from the data sources in the workbook.
  • Then map the fields from the current data source to the new data source, and use the handy features within data mapping (preview of data type, domain values, fields already assigned).
  • A nice addition in 2023.2 was, that non-matching data types are greyed out, so there is really almost nothing that can go wrong.
  • Hit “Replace Data”, and you’re done (you might also want to check for calculated fields with hard-coded references and for non-dynamically updating parameters).

Hack It!

I’ve immediately found it kind of annoying, that this feature is limited to accelerator workbooks only, because I think there is a need for this feature for other use cases as well:

  • Internal calculation templates
  • Replacing a dev data source with a prod data source
  • Making all the great stuff from Tableau Public easier useable with your own data

That’s why I wanted to understand what’s going on here.

First I discovered, that I have a different menus for a data mapping enabled workbook than for the default workbooks, although being on the same product version.

At this part, I thought that it can only be in the workbook, and then first tried my quick-and-dirty approach: Deleting everything from a data enabled workbook, and then connect some other data.

Nice!

That means, it had to be something in the XML of the workbook, and my good friend Merlijn Buit pointed me to the area in the XML that does the trick.

Here we go!

If you don’t want to change the XML your own, you can download a blank workbook that has data mapping enabled from my Tableau Public profile. (Note: it’s not officially recommended/supported from Tableau to hack the XML 😉😅)

Thanks for reading, do something nice with it!

1 COMMENTS


Avatar
Nov 15, 2023, 10:38:17 AM
Steve | VizDJ says:

Thanks Klaus, great write-up. Good to see you in Berlin this week!