1 Reply Latest reply on May 22, 2015 7:17 PM by Dan Scott

    Mapping of data sources with workbooks

    Namrata Sawant

      Hi All,

       

      Which view in the 'workgroup' database of Tableau's postgresSQL server will help me know the mapping of data extracts with workbooks?

      If this information is not available in the default workgroup DB views (starting with underscore), where do I get this information from?

       

      Any help is appreciated. Thank you in advance

       

      Best Regards,

      Namrata

        • 1. Re: Mapping of data sources with workbooks
          Dan Scott

          You seem to be using "data source" and "data extract" interchangeably here, and they are not really the same thing.

           

          If you want to know which extracts are associated with a workbook, then I believe that you can join from the workbooks table to the data_connections table like this:

          SELECT * FROM data_connections AS dc

          INNER JOIN workbooks AS w

               ON w.id = dc.owner_id

          WHERE dc.owner_type = 'Workbook'

          ORDER BY w.id

           

          For a given workbook, you may see multiple data_connections records returned.  The data_connections records with a dbclass of "dataengine" are (I assume) the ones that correspond to extract data.

          However, a workbook may also be associated with a data connection that corresponds to a published data source, and sometimes that data source might be based on an extract.  In this way a workbook might have an indirect dependency on an extract.  Datasources (listed in the datasources table) can also be linked to the data_connections table like this:

          SELECT * FROM data_connections AS dc

          INNER JOIN datasources AS ds

               ON ds.id = dc.owner_id

          WHERE dc.owner_type = 'Datasource'

          ORDER BY ds.id

           

          When a workbook uses a published data source, I believe it links to a data_connections record with a type of "sqlproxy"  It should be possible to match the sqlproxy record, with the information in the data_connections record corresponding to the data source (perhaps using the name or dbname fields?)

           

          It may also be worth noting that workbooks and datasources both can be joined against the "extracts" table, and the descriptor field of that table gives the directory name under which the corresponding extract files are saved.

           

          Sorry I don't have all the answers here, but hopefully this will help.