Prior to Tableau 10, all formatting was done on a worksheet by worksheet basis. Tableau Desktop now has a concept of “workbook formatting” which become the default for any new worksheet. Each version of Tableau is bringing more formatting options into the scope of workbook formatting (for example, line formatting is being added in 10.2), but not everything is available yet.
Make a Template Worksheet and Dashboard
For any option available in workbook formatting, you should set it there (in the Format->Workbook menu at the top). For other things, like background shading, you should create both a template worksheet and a template workbook.
For the template worksheet, I suggest creating a Calculated Field with a simple message indicating that it is a template to be copied. Drag the field onto Text and change the fill type selector at the top from “Standard” to “Entire View” to make your message show up. Use the Format->Worksheet menu to set everything you’d like.
Next make a template dashboard the same way, and drag out the Template Worksheet. In the end, it will look something like this:
Now publish it to Tableau Server. Rather than having users start their ad hoc analysis from a Data Source, have them start from the Ad Hoc Template Workbook. When they Save As to a new workbook, they can delete the templates sheet and dashboard because the new sheets will have that formatting which they can duplicate from.
Tableau has had UNION for Excel and text files for several versions now, but Tableau 10.1 delivers a huge expansion of the feature with Wildcard Pattern-Based UNION. Now, you can set up a match pattern to bring in all the files you have into the UNION automatically.
To see how it works, check out the ever excellent Tableau Online Help.
Not only is this an immensely helpful feature for saving time the first time you are doing analysis, it also can save a ton of development time and effort when you are dealing with data sources that aren’t already in a database.
Parameters allow for a lot of awesome Tableau functionality. When working with template publishing, it makes sense that you might want to do variations on the display names for a parameter, or even set the options arbitrarily for each site you will publish to. However, despite looking like part of a data source, Parameters are actually stored as their own data source within a workbook. This means we’ll need to consider how to insert and modify them in each workbook.
In Tableau, colors are assigned to a given dimension across the workbook (as opposed to just per sheet). This assignment actually happens in the XML, which means you can substitute in different color assignments if you are publishing from templates. Even better, in Tableau 10.0, if you assign colors from one of the included color palettes, new items will automatically be assigned a color from that palette.
Using the Web Data Connector to publish arbitrary extra content to Tableau Server is pretty amazing when you think about it; it also works for embedding web edit in an iframe.
If you have ETL processes that must run before your extracts can generate, it may make more sense to trigger an extract refresh (or the schedules) to run after the ETL has finished, rather than setting the extracts on a schedule. It maximizes your backgrounder processes by feeding their queues immediately when data is ready, and saves wasted effort if the ETL process fails.
As of Tableau Server version 10.0, there are no REST API commands to do this triggering, but tabcmd does have commands that can accomplish this. The tableau_tools Python library has a Tabcmd class that wraps the most common tabcmd commands, including those for extract refreshes. Together with the tableau_rest_api sub-package, you can trigger off extract refreshes.
Note: Please use the latest version of tableau_tools (3.1.0+) to do the following.
Please see the latest release of tableau_tools for the current methods for doing permissions setting.