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. :-)