Overview of the Tableau Document API
masterThe Tableau Document API is a Python SDK designed to programmatically update Tableau workbook (.twb, .twbx) and data source (.tds, .tdsx) files. It serves as a safer alternative to manual XML manipulation ('XML hacking').
Key Capabilities:
- File Support: Works with
.twb,.twbx,.tds, and.tdsxfiles (dating back to Tableau 9.x). - Connection Inspection: Extract connection details including Server Name, Username, Database Name, Authentication Type, and Connection Type.
- Connection Updates: Programmatically update Server Name, Username, and Database Name within workbooks and data sources.
- Field Inspection: Retrieve all fields in a data source or identify fields currently in use by specific sheets within a workbook.
Limitations:
- It cannot create files from scratch.
- It cannot add extracts into workbooks or data sources.
- It cannot update field information.
- It does not support
.hyperfiles (use the Tableau Hyper API instead). - It no longer supports Python 2 (Python 3+ required).