November 17, 2015

Using embedded extracts to edit published data sources on Tableau Server

There are advantages to using a published data source, but there is one downside to using them. As mentioned in this link, it is not possible to edit a published data source directly on Tableau Server and requires that the developer make a local copy of the data source. The method described in the link is not ideal for the following reasons:

  • For large data sources, it can take a lot of time to download the data sources to your local machine and republish them to the server
  • Replacing data sources can reset quick filter formats on dashboards (e.g. converting single value dropdowns into multi value lists)
  • Since this method is time consuming, it makes it difficult to quickly make changes based on feedback and adapt to changing business requirements

The method that I’ve been using to edit published data sources is able to prevent all of these issues. The basic idea is that you don’t need all of the data to edit published data sources. You just need the metadata. After you have created an embedded extract using a limited amount of data in Tableau Desktop and built your dashboards/visualizations, follow these steps:

1. If you have a large data source, create an empty extract in Tableau Desktop and publish the empty extract to Tableau Server. After it is published, you can refresh it manually on the server so that the full data source will be populated on Tableau Server instead of your local machine.  






2. Connect to the new published data source in Tableau Desktop.







3. Replace the data source in the workbook from the embedded extract in the workbook to the published data source on Tableau Server. Verify that nothing breaks or reformats when you make this replacement.












4. Do not delete the embedded extract. Instead, re-extract the embedded extract with only a subset of the full dataset (e.g. 5 sample records or 1 day of data). (This is explained later).

5. Publish the workbook to the server with the dashboards/visualizations connected to the published data source and the embedded extract disconnected from any dashboards/visualizations.

6. Whenever you need to make changes to the published data source on Tableau Server, make the changes in the embedded extract in the workbook, create an empty extract of the embedded extract if necessary, and then publish the embedded extract with the changes to the server overwriting the existing published data source. 


The reason why you are maintaining the embedded extract is so that you will still have access to the metadata of the data source without having to download the data source from the server. Having a few rows in the embedded extract allows you to test the new calculations or changes on a small amount of data and reduces the size of the workbook so that it can be downloaded or published to the server quickly. When the published data source is overwritten, the changes will be reflected in all of the dashboards/visualizations connected to the published data source without having to use “Replace data source.” If you need to, you can right click on the published data source in Tableau Desktop to refresh the connection. 











Now that you know how to work with data sources, check out my post of How to Default your Tableau Dashboard to the latest date of a data source