1 Reply Latest reply on Feb 25, 2019 4:05 PM by Patrick Van Der Hyde

    Connecting view and data via tableauserverclient


      I'd like to use the Python tableauserverclient API to:

      1. Upload a local workbook with a pre-configured view once (OK -- happy to do this out-of-code because it is a one-time cost)

      2. On a regular cadence, upload data (OK -- I have code that accomplishes this via the Extract API)

      3. At that same cadence, point the view to the recently uploaded data and refresh the view (STUCK -- either directly pointing and/or duplicating the source workbook to point at the new data seem like reasonable approaches -- but I can't figure out this step)


      It strikes me that this might be a core & common task, so perhaps I'm taking a fundamentally wrong approach?


      I've read extensively through the docs and samples (https://onlinehelp.tableau.com/current/api/rest_api/*, https://tableau.github.io/server-client-python/docs/samples/*, https://github.com/tableau/server-client-python/blob/master/samples/*), and I've spent substantial time on Google and local forums -- but we haven't been able to break free so far.


      Some other potential clues:

      - Even though I can upload data to a project through the Extract API, I cannot list those same datasets through the API even using the sample code that returns all the top-level datasets (perhaps because they belong to a project?)

      - Even though I can upload data to a project through the Extract API, I cannot configure the workbook to use those extracts even through the UI.


      Thank you for any assistance you can offer! Tableau Server reports its version to be 2018.1.1.

        • 1. Re: Connecting view and data via tableauserverclient
          Patrick Van Der Hyde



          Are you trying to refresh the extract of an existing view from a command line?  If so, then I utilize the tableau option -refreshextract


          From the bin directory - that command would be


          tableau refreshextract --datasource "nameofdatasource" --site "sitename" -c configfile.txt


          The config file would (at least in the version that I utilize) contains the following information:








          source-password="datasourcepassword "


          Learn more here - Refresh Extracts - Tableau


          If you need more than that, please let us know. 


          Thank you



          1 of 1 people found this helpful