Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Tableau TWB Audit Workflow - Sharing and Asking for Input

mix_pix
10 - Fireball

Hi,

 

I set up a workflow to audit a Tableau .twb file.  I got the idea after reading this post but found that that macro didn't quite get me the output I was looking for.  Being new to XML and RegEx, this current version took me quite a few brain cycles and I suspect there are multiple ways to improve it, which is why I'm attaching it here.  It works, but there may be ways to arrive at the same (or better) results with fewer or more robust/elegant steps. :-)

 

What it does:

 

  • Reads in a .twb file
  • Identifies all fields used in the workbook
  • Cycles each calculated field through an iterative macro that replaces generic field name references like [Calculation_0021112080235996] with the actual field name, which makes for much easier reading and auditing.
  • Joins the fields with a list of all worksheets that use them
  • Outputs the data to a TDE for exploration

 

What it doesn't do (yet):

 

  • I can't figure out how to identify fields in the XML that are only associated to a worksheet because of an Action filter remnant.  This isn't a huge deal, but I've noticed that some fields are linked to a worksheet simply because at one point an action filter with that field was applied to that sheet and that action filter remained on the filter shelf.
  • Process more than one .twb file (so that I can check across workbooks whether the same fields and calculations are used).  I suspect this is just a matter of turning this into a macro that leverages a Directory tool to pull in all .twb files in a particular folder.  That, or an iterative macro that allows you to specify exactly which .twb files you want to feed in.

If this module works for as-is, feel free to use it.  If there are things I can do to it to make it run better/easier, I'm open to all feedback. :-)

twb audit.png

25 REPLIES 25
jeffireland
5 - Atom

When I download and run the latest version, 'TWB_AUDIT (Working Version).yxzp', posted by jusdespommes on 1-4-19, it runs successfully (pointed to the 'SampleWB.twb' file).  When I try adding one or more of my twb files to the same directory, I get the errors shown below.  There seems to be some difference with the twb files, but not sure what (perhaps created with different Tableau versions)?  Any ideas from anyone?

ThizViz
11 - Bolide

I just resolved this error using the instructions in this post. Hope it helps.

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Macro-issues-with-quot-Field-schema-ch...

 

Reiterating for text searches: 

 

The cause of the errors ["the field schema for the output changed between iterations” ] is that the number of columns or names of column headers (thus, the schema) are different between iterations.

 

You could fix this by

1. Open your macro

2. Select your Macro Output tool

3. on the Interface Designer panel, click on the Properties icon

4. Update the Output Mode to 'Auto Configure by Name' 

 

The results will then be 'unioned' 

@thizviz aka cbridges, Bolide
http://community.alteryx.com/t5/user/viewprofilepage/user-id/2328
cheangvi
7 - Meteor

Thrilled to find this workflow as I am looking for some ways to document a bunch of fairly complex Tableau Dashboards with numerous worksheets and calculated fields.

Great work, guys!!

 

 

cheangvi
7 - Meteor

Hi Karthik,

 

I was also looking to do the same, but with little success.  I have quite a few Dashboards and multiple worksheets, keen to know how to unravel the xml.

Would be great if you can share some pointers.

 

Regards

Viv

TimM16
6 - Meteoroid

So I think I am late to the party here, but this is exactly what I am looking for. Thank you! I do have one question:

 

What are the regex tools doing? Just looking for any number 1-6 in the name field, and using that as connection id? 

TimM16
6 - Meteoroid

Hello @jusdespommes . I know this was several years ago, but I am trying to use the workflow you put together and running into an issue.

 

It seems that the macro cannot find the correct field names sometimes, and just replaces them with the datasource name. I can' seem to find the spot in the macro that does this. Any chance you can help out?

 

 
 

image.png

Labels