How to import a .TWB in Alteryx

This initial blog post and tip forms the ground work for a wider project that will show how we can use Alteryx to allow a user to select specifically what content they would like in their final workbook. What is values are contained within the filters? what values exist within a parameter? what worksheets exist on a dashboard? what dimensions exist in a table? the list is pretty endless.

I’m going to call this series ‘Controlling Tableau from within Alteryx.’

But 1st things 1st, we need to be able to import a workbook directly into Alteryx, not as easy as you might think given that a .twb is not a support file type (although it’s definitely not hard!).

Ofcourse the process still starts with an input tool, so drag one onto your canvas. Then within the input configuration panel, navigate to your .twb file, a note here is that we need to be sure we change the ‘Files of type’ option to read ‘All Files’, we then select ‘Open’.

Now Alteryx is going to ask us to resolve our file type. Within this pane we are going to select ‘Read it as a delimited text file’, we are going to select the ‘Other’ delimiter type and use ‘\0’, we are also going to uncheck the ‘First Row Contains Field Names’ option.

The image below shows an example configuration.

resolvetype

Once you press ‘OK’ you will now see in the preview panel you have one field, aptly named [Field 1]. This one column contains every row of XML (.twb is essentially an XML file) that lies beneath the Tableau work you have created.

Be sure to change the Field Length variable which is automatically set to 254 characters, even with a blank workbook you will loose some characters from your XML strings and thus corrupt the workbook. I as a standard set mine to 2000 characters, though this may affect performance. Whatever you set this too, be sure to check for conversion errors that suggest records in [Field_1] have been truncated.
truncate.png

 

 

2000char.png

You now have all sorts of opportunity in your hands to amend your workbook from outside of Tableau and inside of Alteryx.

A word of caution though, any changes you make will definitely not be supported by Tableau.

Be sure to look out for future posts!

Ben

 

Advertisements

2 thoughts on “How to import a .TWB in Alteryx

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s