1 Reply Latest reply on Nov 2, 2018 3:22 PM by Patrick Van Der Hyde

    Need to extract and download Tableau Report Data (viewData) in CSV using Java API

    Meenakshi Kamboj

      Explanation: Tableau server is configured for active user directory. I have access to tableau server. By using java code, on my local machine I am able to download the tableau report data in CSV format. Below Steps are followed:-

      1. In java, based on workbook name , getting the view_url from postgre tables and forming the urls to download csv.


      "select view_url from _views , workbooks where workbooks.id=_views.workbook_id and workbooks.name=?"

      1. e.g: http://"servername"/views/"workbookname"/"view_url".csv



      2) Wrote the java code to download the file from URL

      3) File downloaded successfully on local machine as I was having access to Tableau server.



      • when  tried to run the same code on other user's machine or server machine who don't have access to Tableau server then data extraction is not working . Done the authentication by providing tableau credentials and setting X-Tableau-Auth header but was not able to extract the tableau report data by using same url's e.g "http://"servername"/views/"workbookname"/"view_url".csv ".


      • Tried Java reference API also but not able to find exact API that will help to fetch the Tableau reports data (view Data).