5 Replies Latest reply on Feb 6, 2017 8:36 AM by Jeff Strauss

    Workgroup database information

    sandeep chayanam

      Hi all,

       

      Any of you know if there is a way to find out (from workgroup database) whether a published workbook is a .twb or .twbx ?

       

      Thanks,

      Sandeep.

        • 1. Re: Workgroup database information
          Donna Coles

          Hi Sandeep

           

          I've moved your query in the Server & Admin space of the forums as there may be more people that can help.

           

          Personally I think the refreshable_extracts field on the workbook table in the database would give you a clue.  It's a boolean field and if true indicates 'the extracts in the workbook can be refreshed' which implies to me that there is at least one extracted datasource associated to the workbook and therefore is a twbx.  This might not be the definitive answer though.

           

          Donna

          • 2. Re: Workgroup database information
            Matt Coles

            A workbook can be a .twbx if it's packaged other files with it. They can be text files, or data extracts, shape files (well, in 10.2), etc. I don't think there's a single field to look at to determine this, but the best I could suggest would be to use TS Data Connections from Shareable Data Sources for Tableau Server , and filter to Data Connection->Datasource Data Engine Extracts = T. That would give you all connections in workbooks and data sources that contain data extracts.

            • 3. Re: Workgroup database information
              Jeff Strauss

              I don't know of any reliable way via the internal database.  The problem is that even if you don't have embedded extracts, if you have other external resources such as embedded images, then it should be twbx instead of twb.  What do you need to know for?  If it's needed to know within a script, I may have a workable scripted option where I do a tabcmd get of workbooks and download it as twbx and if it's not valid, the script renames it to twb.

              • 4. Re: Workgroup database information
                sandeep chayanam

                Thanks Matt & Jeff for your replies.

                 

                @Jeff, I want to automate the downloading the workbooks using the tabcmd which expects the extension of the file. (twb/twbx)

                 

                Workbooks published on the server can be any of the following:

                • workbooks with embedded extracts
                • workbooks with embedded extracts with embedded images
                • workbooks with embedded images with live connections
                • workbooks with live connections

                Points 1,2,3 are .twbx where as point 4 is a .twb.

                 

                Currently I'm assuming everything as .twbx within my script. This assumption doesn't work for point 4.

                Also, is there a tabcmd option to "unpackage" ?

                 

                Thanks,

                Sandeep.

                • 5. Re: Workgroup database information
                  Jeff Strauss

                  we ran into the same issue in our automated download script.  In order to address point #4, we did a workaround within our script.  It's not so pretty, but it does work.  See this simplified version of the script attached.