Easy empty local extracts

'Easy Empty Extracts' Sounds like a kids' tongue-twister. But it's actually a hot Tableau tip, courtesy of our very own Ryan Stryker, Sr Business Consultant, Tableau Professional Services. Thanks, Ryan! Extracts are not a hard sell; the performance gains we see through the local materialisation of data views are usually staggering. And Tableau Server gives us a handy platform for auto-magically refreshing it all. For large extracts, though, it can be quite time-consuming to create a desktop version before publishing to the server. Understandably, customers often ask if there’s a way to “just have Server do it”. Of course there is.

Extracts are not a hard sell; the performance gains we see through the local materialisation of data views are usually staggering. And Tableau Server gives us a handy platform for auto-magically refreshing it all.

For large extracts, though, it can be quite time-consuming to create a desktop version before publishing to the server. Understandably, customers often ask if there’s a way to “just have Server do it”.

Of course there is.

We’ve already seen a blog post or two (thanks, Russell!) offering techniques for generating small extracts in Desktop, which can then be fully populated after they’ve been published.

I’ve been using a slightly more flexible version that makes Server build the entire thing immediately – and I thought that some of you might find it useful.

The first step is to establish a Boolean parameter for a little control:

Show the parameter control in the workspace for easy toggling.

Next, we’ll need a calculated field to expose the chosen value.

Now we define our extract, using the above calculation as a filter.

The trick here is to exclude the exposed value (“True”, in this case), because we need this condition to evaluate false immediately. The goal, after all, is for no rows to be returned.

Our extract definition now looks like this:

Hit Extract, select a location for the .tde file, and the process should be finished in seconds. We now have an extract with no data in it at all.

Next, we'll move this content – perhaps in the form of a reusable data source – to the server. The critical step is to flip the parameter, like so…

…and publish.

The published version doesn't contain the forced fail condition in the extract definition, so any refresh – immediate or on a schedule – will populate the extract in full.

The above technique is more appropriate for an extract that is part of a shared data source than one living within the context of a workbook. This is because we’re likely to need the extract at the beginning of the development cycle, and employing Data Server in our workflow is an obvious path.

In addition, an empty extract in a workbook – even if we’ve developed views with a live connection – means that no data is present at publication time, and the generated thumbnails will be blank.