5 Replies Latest reply on Apr 25, 2017 6:51 AM by Tushar More

    Autopublishing of Tableau Workbook

    Nikhil Srivastava

      Hi,

       

      we want to automate the process of publishing Tableau workbooks to Tableau server. can anyone advice on how to proceed? Is there any script for Doing autopublish or any REST API that can solve my Concern?

      Thanks

        • 1. Re: Autopublishing of Tableau Workbook
          Tushar  More

          Hi Nikhil,

           

          You can create a batch file using tabcmd command line utilities;

          Here is an example:

          First you need to login to your server: tabcmd login -u xxxx -p xxxx

          tabcmd publish workbook1.twbx -o

          tabcmd publishworkbook2.twbx - o

           

          echo *FINISH*

           

          You can even take it a step further and use Windows task scheduler to automate the execution.

           

          Hope this helps.

           

          ~Tushar

           

          • 2. Re: Autopublishing of Tableau Workbook
            Nikhil Srivastava

            Hi Tushar,

            Thanks for Your Explanation. it was really helpful.

             

            Some of the Tableau workbooks that we have have both Extract Data Source and live Data Source within the same workbook. Can tabcmd will be able to publish in this Scenario As well?

             

            Thanks,

            Nikhil Srivastava

            • 3. Re: Autopublishing of Tableau Workbook
              Tushar  More

              Yes it should work. I haven't faced any problem so far.

               

              If you find this helpful, please close the thread by marking this answer as correct / helpful.

               

              ~Tushar

              1 of 1 people found this helpful
              • 4. Re: Autopublishing of Tableau Workbook
                Nikhil Srivastava

                Hi Tushar,

                 

                My issue got resolved for publishing of workbook having both live and Extract connection on the same workbook.

                 

                but can it publish Workbook having multiple connections like having different username and password?

                 

                the Command which i am using is :

                 

                tabcmd publish "C:\Tableau Workbooks\analysis.twbx" -n "Sales_Analysis" --db-username "user" --db-password "pwd"

                 

                in this command i have to explicitly pass the username and password used in the workbook.

                i am wondering what to do in case of workbook having different connection with different username and password.

                 

                Thanks,

                Nikhil Srivastava

                • 5. Re: Autopublishing of Tableau Workbook
                  Tushar  More

                  Hi Nikhil,

                   

                  You need to provide the username and password when you publish a view.  If you want to avoid this then you can first publish data sources with embedded credentials so as to avoid passing the usernames and passwords via tabcmd.

                   

                  Hope this helps.

                   

                  ~Tushar