3

Does anybody know where I can get the XML Schema for Tableau Workbooks, Data Extracts and Data Sources?

I know I could reverse engineer using existing report files but I will not get all the possible values for the different complex data types. I am also aware that Tableau Software does not encourage to edit the files directly, but it's just an experiment I am trying to do.

William C.
  • 396
  • 2
  • 8
  • 1
    Take a look at http://stackoverflow.com/questions/30136030/what-tableau-api-does-interworks-uses-in-their-workbook-sdk/30144958#30144958 – Alex Blakemore Jun 01 '15 at 14:18
  • Thank you Alex. The information was useful. It's somehow what I expected, there is no official version of the XML schemas but there are third-party tools, one that already knew existed but its cost it's a little bit prohibitive if you count all the costs related to Tableau as a complementary BI tool. – William C. Jun 01 '15 at 23:12
  • 1
    Keep reading the link. In addition to the COTS tool from Interworks, there is a free public domain library and some tools built around it. – Alex Blakemore Jun 02 '15 at 02:42
  • Yep, I was thinking to use approach No 2 (public library) with No 3 (my own solution) to create a Python or Java version. – William C. Jun 02 '15 at 03:02
  • The twb library is a Ruby gem. Ruby is great for writing simple tools with just a little code, and there are some good examples to follow on the tableau tools github site. You probably will get where you want to go faster by reusing the twb code, even if its your first Ruby script (as opposed to recreating the twb library in Python or Java) – Alex Blakemore Jun 02 '15 at 19:54

1 Answers1

3

You can use python to parse the xml...

i have coded it to retrieve all your information example code

you can iterate through required elements.... for example loop through required element

import xml.etree.ElementTree as ET
tree = ET.parse(filename)
XML_datasources = tree.findall('datasources')
XML_val = XML_datasources[0].iter('datasource')
for item in XML_val:
    name = item.get('name')

There will be multiple nested items good luck parsing

apak
  • 31
  • 4