.twb vs .twbx: What’s the difference?

Data

.twb vs .twbx: What’s the difference?

//

 

Whenever you save your work in Tableau, the default file extension is .twb, or Tableau Workbook.  However, you have the option to save your work under a different extension, .twbx.

A .twbx file is a Tableau Packaged Workbook, meaning it is the original .twb file grouped together with the datasource(s) in one package.  .twbx files can be considered analogous to specialized zip files, in which these “zip” files contain all the information necessary to work in Tableau.   The primary advantage to using .twbx files is that analysis can be performed without network/internet connections to your data because your data is already present on your computer in this packaged file.

The .twb file alone is not enough to perform any analysis because it only contains Tableau’s instructions for interacting with a datasource.  In actuality, .twb files are XML files specially tailored to interact with datasources.  They are custom built to make the awesome visualizations that Tableau generates.  Here you can see a picture of a .twb file opened in Notepad++:

This particular workbook file is 1029 lines long.  Lines 21 and 22 detail information about the connection to a data source. 

The name of the data source: name=’Sample – Superstore Sales (Excel)’

The type of data source:  class=’excel’

The location of the data source:  filename=’C:\Users\bcarlton\Documents\My Tableau Repository (Beta)\Datasources\Sample – Superstore Sales (Excel).xls’   –    I’m working with one of the sample sources, so, naturally, this is found in the Tableau Repository directory.

If you examine lines 42 and 43, you can see the XML detailing the “Time to Ship” measure.  Some of the important information includes the following:

default aggregation setting: column aggregation=’Max’

data type:  datatype=’integer’

measure or dimension:  role=’measure’

formula for being calculated:  note the comment (// this is the number of days between the order and shipment ) and the calculation (datediff(‘day’,[Order Date],[Ship Date]) 

I could go in to much more detail, but a crash course in XML as well as a discussion of its flexibility is outside the scope of this post.  Again, this is here to illustrate that .twb files just contain instructions for interacting with data sources.  

To see the data/.twb package combination in a .twbx file, one can simply right-click on the .twbx file and choose “Unpackage.”  Like unzipping a .zip file, unpackaging the .twbx will extract and split the .twb from the data source.

Notice that in that directory, you can find the original data source.

It should be noted that I was connected live to this Excel data when I saved the .twbx file.  Your data source and the type of connection (internet vs local) dictate whether you can create .twbx files at all.  If you are connected to a database or server, you need to create a tableau data extract (.tde) before you can take advantage of the packaged workbooks. A .tde is a proprietary format that Tableau uses to process data.  Some files (like Excel workbooks and csv’s) can automatically be packaged in a .twbx file without needing to convert the data to an extract.

Again, it is quite advantageous to work with .twbx files so that you create visualizations based without an internet connection to your source.  Furthermore, .twbx files can be used in conjunction with Tableau Reader as well.  However, if your source is large, then creating an extract might result in a workbook in which the file is too large and impractical to use.

More About the Author

PYD124 – Data Council Austin 2024 Preview with Jack Hulbert, Brooks Barth & Mat Hughes   In this episode, Content Manager Garret Sauls sits down with Analytics Architect Jack Hulbert, Analytics Lead Brooks Barth and ...
Tableau Pulse: Set Up and Use Case Demo If you’re wanting to see someone work in Tableau Pulse, we have you covered: We wanted to share a video we put together when we ...

See more from this author →

InterWorks uses cookies to allow us to better understand how the site is used. By continuing to use this site, you consent to this policy. Review Policy OK

×

Interworks GmbH
Ratinger Straße 9
40213 Düsseldorf
Germany
Geschäftsführer: Mel Stephenson

Kontaktaufnahme: markus@interworks.eu
Telefon: +49 (0)211 5408 5301

Amtsgericht Düsseldorf HRB 79752
UstldNr: DE 313 353 072

×

Love our blog? You should see our emails. Sign up for our newsletter!