Search code examples
tableau-api

Access non-public PostgreSQL DB from Tableau Desktop through Tableau Server


Reading through the documentation of Tableau Server I was not able to determine if the following works:

  • I have set-up Tableau Server 2020.4.0 along with the PostgreSQL driver
  • I added a connection to an internal, i.e. non-public, PostgreSQL DB via Tableau Server
  • I can access the PostgreSQL via logging in to Tableau Server just fine

I am also able to connect to the Tableau Server through Tableau Desktop BUT I cannot connect to the PostgreSQL as it is not directly accessible from the client machine running Tableau Desktop.

Is there a way to access this non-public PostgreSQL database connected to Tableau Server from Tableau Desktop through Tableau Server?


Solution

  • Answering my own question and following @matt_black's comment it is indeed possible to access and use published Datasources from Tableau Desktop which are not directly accessible.

    For that you need to login to the Tableau-Server UI (not TSM via 8850), create a Workbook, click on "Datasource" (bottom left hand corner) add a single or multiple connections and then head back to any "Sheet" Tab (also bottom left hand corner).

    At this point it is recommended to save the Workbook as "Template", i.e. "my_published_datasoure_template" – explanation follows.

    After saving the Workbook you need to hover over the Datasource-Icon in the "Data" Tab and click on the appearing dropdown-arrow to publish the Datasource.

    It needs to be mentioned, that once a Datasources has been published this way it asks you to update the workbook right afterwards which you must deny in order to be able to edit the Datasources of the workbook afterwards.

    If you need to edit the Datasource at a later point be sure to delete the previously published Datasource then edit and re-publish it.