4 Replies Latest reply on Mar 14, 2018 9:23 AM by Pamela Germain

    Tabcmd - Create a twbx file from Tableau Server with the Data Refreshed

    Pamela Germain

      I have a workbook with 3 data sources with the data as extracts on Tableau server. I need to create a local copy of the workbook with the data sources refreshed first.

       

      Data sources = SQL Server

      Connected to 3 tables, clicked on the Extract option on the Data Source tab for each.

      Uploaded the workbook with data source embedded credentials to my Tableau Server.

       

      I created a batch file that looks like this

      "\\Tabserver2\d$\Tableau\Tableau Server\10.5\bin\tabcmd.exe" login -u test_account -p 1234 -s http://Tabserver2
      "\\Tabserver2\d$\Tableau\Tableau Server\10.5\bin\tabcmd.exe" get "/workbooks/test_workbook.twbx?:refresh=yes" -f "D:\temp\test_workbook.twbx

       

      I run the batch file and everything works as expected, I can see and open the local twbx file. I went back to the SQL server, modified the table and re-ran the batch file. The "refresh" part of the command line is not working. The newly created workbook does not have the modifications I made to the underlying data.

       

      The Tableau article tabcmd Commands  that explains the various options for tabcmd does not clearly show an example of refreshing using the Get option for a twb/twbx file. The Export option explains how to add it to the end of the string in the command, but the export option does not include twbx. The Get option is what you use to create a local twbx file, but it does not provide an example to use refresh, nor does it explain that you Can use it. My experience is that the appended ?:refresh=yes is being ignored.

       

      Am I missing anything in my script or does refresh not work with Get and twbx?