community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

Tableau TWB Audit Workflow - Sharing and Asking for Input

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

Fireball

Uploading a revised version...I realized after I posted my original file that I hadn't used relative paths. :-)

Asteroid

Hi Mix Pix

 

I am also interested in doing this for my workbooks. Can we include the dashboard name and the associated workb sheets. I see currently you are joining with worksheets. I think it would be good if you can get the dashboard name.

Datasource name

Can we get the table names and SQL Query also added to the workflow if that is something posisble to make it useful.

 

Thanks

karthik

Fireball

Hi karthik,

 

Thanks for the note...yes, including dashboard names is something I am thinking of adding now that I've got the basic elements down. :-)  Regarding SQL and Table Names, I'll need to experiment with the XML against a workbook that uses a live database connection...none of ours do, so I don't have any firsthand experience with that.

 

I'm attaching a slightly modified version to what I published earlier...I added a few steps to deal with workbooks that are missing key fields like column captions etc.  This definitely remains a work in progress as I get more feedback. :-)

 

-Mike

Highlighted
Asteroid

Hi Mike

 

I went ahead and added the server connection details extraction from XML- serverdetails , user name ,port , etc  - done

Removing the duplicate columns / Joined the columns based on data source name and column name ,

Table Names/Custom SQL when directly connected from tableau - done

 

if we have any  relationship/joins defined ( This is still a question mark on how to parse the nested XML).

 

I was trying to parse the dashboard//worksheet relation but still haven't found the way as it is Nested XML and need to find out the names from Zones elements.( This is still a question mark on how to parse the nested XML).

 

Thanks

Karthik

Fireball

Hi Karthik,

 

Thanks for working on enhancing this workflow.  I'll need to spend a little time to decipher what you addded.  Parsing XML is still something I'm trying to get more comfortable with. :-)

Meteor

Guys thank you for this. It has been a great help.

Fireball

Hi @mohsin - thanks for the feedback.  Glad you found this helpful.  I've actually (finally) written a blog post about the steps I took to create the workflow, which you might find useful as well.  I also managed to turn it into a batch macro so that you can feed in multiple workbooks at once. :-)

 

 

Meteor

Nicely done. This functionality was really lacking in Tableau but now we do have a way forward - short of editing and revieweing XML.

Fireball

Thanks @mohsin!  Yeah, it's nice to have this level of control and I suspect we can build this out to do even more.

Labels