2 Replies Latest reply on Jun 1, 2017 4:12 AM by Vathsala Achar

    Open source wrapper for Tableau SDK in Python to create and publish .tde

    Vathsala Achar

      Hi all,


      I have published a library TRExt - (Tableau Refresh Extract) to create a tde from a table or a view on a database (needs testing on all databases) and publish to tableau server.


      The API is pretty simple to use:


      Create a .tde locally

      >>> import trext

      >>> tde = trext.Extract()

      >>> connection_string = "appropriate db connection string"

      >>> tde.create("db.schema.table", conn_string=connection_string, dbtype='exasol')



      >>> tde.location



      Publish the .tde to the server

      >>> tableau_auth_details = ("username", "password")

      >>> publish_details = ("site_content_url", "project_name")

      >>> tde.publish("tableau server address", auth=tableau_auth_details, params=publish_details)



      I have tested this against EXAsol (in-memory database) but not much else as we don't have a need to currently. But I initially wrote this library to support MSSQL and all the code is in place in the library to connect to MSSQL but it has not been tested yet.


      If anyone would like to give this a try and give me feedback I would much appreciate it.


      This library could potentially save a lot of people a lot of time. Contributions are welcome!


      For a bit more detail on why you'd want to do this, and some advice on implications for workbook development, my colleage Simon Runc has put this blog together...as well as some interesting insights into how/where calculations are stored in Tableau

      There is also slightly more detailed documentation available here, please have a look and we would love feedback!


      Message was edited by: Vathsala Achar (to add link to documentation)