How to generate the initial extract with Tableau Server
September 11, 2014
, , , , , ,


A lot of folks are struggling with this issue: imagine that you have to build an extract with millions of rows from your slow databases. You are on your corporate VPN from a hotel room or from a plane. It’s just painful and risky and the extract sorting process will consume a lot of CPU resources on your computer – giving away valuable resources from Flappy Bird and friends. So, what is the solutionBen Sullins and Peter Juel Jensen suggest to create database views while Russell Christopher using a calculation trick (where you should wait a day for the miracle) to move the initial extract generation to the Tableau Server side. Well, I don’t like these solutions: sometimes you just do not have the rights to create a database view or you need the results ASAP. So, what’s my approach?

These are the steps you should take, I will explain them in details:

  1. Create an initial extract with 1 sample row
  2. Edit the twbx file and change the “1” row to “-1”
  3. Publish to the server and generate it

If you are new to extracts I suggest to read Tom Brown’s excellent article on extracts.

Create an initial extract with 1 sample row:

Connect to Data Tableau

Open your new datasource and click on “Import some data” or if you have an existing data source just click on “Extract data”.

select top or sample 1 to refresh

Now, select top 1 or sample 1 row to refresh the extract.

It should be fast and painless.

Edit the twb(x) file and change the “1” row to “-1”

This is the tricky part. If your workbook is a “Packaged” one, you should rename it to .zip, open it, locate the twb file and open it. If you have already a twb, then just simply open it with an editor.

Locate the extract part and change count=1 to count=-1

This is the original state

This is the original state where the count=1 needs to be changed


Now it will take all the records next time from the server

Make sure that you save these settings into the twb file. In case you have packaged workbook change back the extension from zip to the original twbx file.

Publish to the server and generate it

Now you should open this edited file with Tableau Desktop, and publish to the Server. After that, go to the data sources and trigger the full extract to refresh. Tableau Server will took all the records (-1 means infinite).


Was that easy? I think so, but if you have a better/different solution, just drop me a line!

Liked this article? Don’t forget to subscribe so you won’t miss any of these!

Tamás Földi

Related items

/ You may check this items as well

sync frelard

Tableau Extensions Addons Introduction: Synchronized Scrollbars

At this year’s Tableau Conference, I tried t...

Read more

Tableau External Services API: Adding Haskell Expressions as Calculations

We all have our own Tableau Conference habits.  M...

Read more
Scaling Tableau Image

Scaling out Tableau Extracts – Building a distributed, multi-node MPP Hyper Cluster

Tableau Hyper Database (“Extract”) is ...

Read more