5 Replies Latest reply on Sep 17, 2018 10:42 PM by X T

    Publishing twb files with tabcmd

    Nay Lin Soe

      Hello all,


      We publish a set number of workbooks (with data extracts) repeatedly, every time on a different Tableau site. For each site, the workbooks are the same, but they connect to a different database from the other sites'. Essentially, for each new site, our workflow is:

      1) create the site

      2) tweak around the connection definitions of the workbooks

      3) publish the workbooks onto the site


      As we wish to automate the whole process (a click of a button as much as possible), we have developed a routine (a .NET program), mainly to handle 2). Since twb files are xml in nature, the routine could open, manipulate the text to set the desired values and save again. As for 1), we rely on tabcmd.


      Now, to complete this "automation", we need to publish in bulk. Again, tabcmd is the answer. However, as it has turned out, tabcmd cannot publish twb files that point to the extract data sources on the local machine. (It can publish either twbx files, or twb files that connect to published data sources on the server, only.) I opened a case with the support and they have confirmed this. According to them, this is happening by design (I still can't understand why), and they have taken in my request of publishing twb files with local data extract as a feature request.


      The reason we keep the workbooks in twb format (rather than twbx) is that it allows us to manipulate the underlying text. Now, it seems that after manipulating the strings in step 2), we have got to open the workbooks one by one in Desktop and 'Save as' twbx again, just so tabcmd can publish them in bulk. This defeats the purpose. We might as well publish them before saving as twbx. (The other option of publishing the data source onto the server first and replace the local data sources also brings in additional manual steps.)


      Have any of you been in a similar situation? If so, what is your workflow?



        • 1. Re: Publishing twb files with tabcmd
          Lester Anciro

          Have you tried to publish first your data/connection to your server and then connect the TWB files to

          your published data in the Tableau server?

          • 2. Re: Publishing twb files with tabcmd
            Lester Anciro

            Try this.


            1. Publish the connection/data first to your Tableau Server.

            2. Connect into the data using Tableau Desktop via "On a server" connection- select Tableau Server and login.

            You'll see there your published data sources.

            3. Create your dashboards. and then save it as .twb file.

            4. Publish the .twb file to the server.

            5. Make a tabcmd batch file which will be handling the refresh and publishing of the data and the dashboards.

            • 3. Re: Publishing twb files with tabcmd
              Nay Lin Soe

              Yes, this does solve the issue with tabcmd. But like I have said, that means I still have to open each workbook in Desktop and replace the connections with the published data sources on the server for each site. The whole purpose of the "automation" is to do bulk updating and publishing without having to open one by one in Tableau Desktop.

              • 4. Re: Publishing twb files with tabcmd
                Lester Anciro

                You can do the updating and publishing of Dashboards in bulk using tabcmd without opening them one by one.

                So the issue here will be the connection right? you want to connect the dashboards to your data in your local machine?


                I have a project almost the same issue as yours. The only thing I did is to publish the extracts,connect the dashboards to the data in the server, overwrite it everyday, and refresh the dashboards using tabcmd.

                • 5. Re: Publishing twb files with tabcmd
                  X T

                  The limitation is:


                  Calculations became part of published data source, no longer part of workbook.


                  So unless the extract is refreshed via Tableau, the calculation would be gone (say using Alteryx to generate .tde files, these files all working well for Tableau, until you decide to publish it and save the workbook, then use tabcmd to overwrite the published tde file using Alteryx generated .ted.)