4 Replies Latest reply on Jan 30, 2019 11:00 AM by Samuel Musser

    Determining tables/columns used by datasources

    Mike McKinney

      Hi All, 


      We have a number of databases that our Tableau background tasks pull data from, in order to refresh extracts for both our published datasources and workbook embedded/local datasources.


      There will be times that we want to deprecate and then eventually remove some columns from database tables that the our Tableau background tasks are pulling from.


      Before we remove columns from these tables though, we first need to be sure that no published and embedded/local datasources are still configured to pull data from those columns.


      I was hoping to write a query against the local Tableau server Postgres metadata repository "workgroup" database, that would return details on which tables and columns our published datasources and workbook embedded/local datasources are configured to pull data from.


      However, in Googling around for ways to write this query, I am finding to my horror that the information I need is likely stored in BLOBs in the "pg_largeobject" table, which is referenced by the "datasources" and "workbooks" tables by way of the "repository_data" table, and the only way I can get to this information would be to download the published datasource .tds files, and the workbook twb. files and use an XML parser of some kind, or do some other kind of search through the text of the .twb and .tds files to come up with this information.


      Is there any easy way that I can do this?  If it is not clear what I am trying to do, please let me know.