Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Updating a TDE with a TDE?




We've just begun using Alteryx.  One of the things we want to do is replace our existing Custom SQL process for updating TDEs.  While I know that Alteryx can generate TDEs (we've already done that numerous times) and even publish to Tableau Server, there's one facet of our current process that I don't know how to accomplish with Alteryx.  Here's a summary of what we do:


  1. We set up the initial TDE via a Custom SQL union (we've replicated this in Alteryx)
  2. We add some calculated fields inside of the Custom SQL (we've replicated this in Alteryx)
  3. We connect a blank Tableau workbook to the new TDE
  4. We organize the dimensions and measures into folders
  5. We add some more calculated fields that need to be in Tableau (e.g. table calculations, parameter-based calculations, etc.)
  6. We publish this "enhanced" TDE to Tableau Server (via the Publish to Server option in the Data Connection menu).  It still points to the Custom SQL as the source for its base content.
  7. Every day we run new data files and send them to a network directory where a chron job updates the enhanced TDE (with all folders and calculated fields)

I know Alteryx can also update existing workbooks with a new TDE, and that workbook could contain the folders and new calculated fields we created in steps 4 and 5.  But what's unclear to me is how we get the TDE that is sitting on Tableau Server (with the folders and calculated fields) updated based on the output of the Alteryx workflow.


Any advice would be appreciated.




You can actually do steps 4 and 5 in Alteryx itself and eliminate the need for repeating step 3 (and opening Tableau) every time assuming the folder structure and calc fields you are creating are the same each time.


One of the well-known 'secrets' about Tableau files, including the .tds data source files, are that they are just XML.  After completing your step 5 next time, open it up in a good text editor like Sublime and start scrolling.  You'll find a few sections of interest:


The <column> portion is where you'll find things like the 'formula=' statements for calculated fields, or <desc> for where the hover description of a measure or dimension is contained (if you added one).  I use that to load metadata definitions right into Tableau to make things easier for our analysts.


The <folder> portion contains the organization of dimensions and measures via <folder-item>


Johnathan Drummey did a brief video discussing this concept of using Alteryx's XML parsing abilities to edit the Tableau files directly:


It's definitely 'Jedi-level' stuff so save a copy of your Tableau files.  But once you understand what's going on and where you need to edit the XML, it's actually quite straightforward.  I found that I learned how it was working best buy making some edits in Tableau, then going back to the text editor to see what it was doing.  From there, I figured out the XML structure and taxonomy I needed to have Alteryx create (just using a formula tool and string fields) in order to achieve the result.


Hi Jason,


That's awesome, but definitely Jedi. :-)  I've never edited XML before, but I do see where the calculation and folder info is and it all looks very straightforward.  I also did as you suggested and modified a .twb to see how the XML changed.  Cool stuff.


While this is something I definitely want to explore further, it isn't clear to me why editing the XML within Alteryx would produce anything different than using the Tableau Workbook tool to update an existing .twb file (with folders and calculations) with a refreshed TDE.  It sounds like I'd still need some mechanism for creating a new extract that included those calculations and folders and then publishing that extract to Tableau Server.


Or would I use the XML Parse tool to take the XML from the .twb file (complete with folders and new calculated fields) and then generate another TDE from that which I could publish to Tableau Server?