Create an Empty Extract

Empty extracts are used for creating literally, pre-defined extracts ready for filling from an alternate source, typically, Tableau Server which usually:

  • has larger pipelines than users
  • is often physically located closer the data-server than an end-client so suffers very little network lag 
  • generally has a larger memory and greater processing power than an end desktop client

The empty extract is a method of defining the connection as you would normally but then instructing Tableau with the aid of a parameter to download non-existent data so that the field names and meta are generated, but no data is captured to the extract during the initial process. 

Instructions

  1. Save your workbook as a .twbx file to ensure the workbook will contain the extracted data
  2. Create a list-type string parameter, call it something like "zEmpty"
  3. Add two items of your choosing, but for this, we shall use "T" and "F"
  4. Now create a calculated field to materialise the output of the zEmpty parameter, call it something useful like zEmptyExtract, and either drag the parameter to the field, or type it's name in the calculated field to materialise it
  5. Now, set your parameter value to "T" (or whatever you have used)
  6. Right-mouse select the connection you want to convert to an extract
    1. Select Extract Data from the context menu
  7. Now we add a filter:
    1. Press the Add... button beneath the filters box
    2. Add the "zEmptyExtract" field
    3. Select "T" or whatever value you chose to represent this
    4. CRUCIALLY now choose exclude to ensure only those fields that do not have the value of 'T' are brought through - all of the data in your source will be marked as 'T' so none of the fields will be transferred
    5. Press OK to add the filter
    6. Press Extract to begin the extraction - this will be complete in a split-second as no data will be transferred
  8. Now save your workbook to ensure the extract is built
  9. CRUCIALLY change the ZEmpty parameter to anything but "T" so all fields will now have this new value allowing "T" to remain as an exclusion
  10. Save your workbook once more
  11. Upload your workbook to your Tableau Server
  12. Set an immediate refresh so Tableau will now extract all the data

Testing

To ensure this method is working as expected, you can first test, although I'd recommend you test with a much smaller Excel file, something like Superstore:
Beginning from Step 5 above and using the Excel file as your source, rather than you actual data source

  1. Drag [Number of Records] onto the pane (if you don't have a Number of Records field, create one) - this will show the total number of records in your set
  2. Set your parameter or field if you have chosen to not use a parameter to 'T'
  3. Setup the refresh - remember, this should really only be done with packaged workbooks - .twbx; add the zEmptyExtract to the filters, setting 'T' to exclude

    Notice how once the refresh completes, your record count shall disappear indicating that you now have no data in your workbook.

  4. Save the workbook to set the data structure
  5. Now change your filter or calculation to any value but 'T' and Save.
  6. Refresh the extract - your record count shall now return indicating that your extract now contains data - this step would normally be the Server refresh, but as you are only testing the method, this can be undertaken on the desktop.