8 Replies Latest reply on Oct 2, 2017 3:26 PM by satish.parvathaneni

    Postgres query to identify datasources not connected to a workbook

    Orlando Gomez

      I have been building some basic views to identify unused datasource/workbooks to help reduce the overall disk space and clutter on our servers. For the most part I have been able to get what I have needed be building queries on the workgroup database however I still haven't been able to establish a clean link between all datasources and there respective workbooks (Left outer join from datasources to workbooks).


      Ultimately I am trying to identify which datasources are not connected to a workbooks, or as I have coined them "Orphan Datasources". I know that the server has the capability of identifying Orphan Datasources because it does so in the Data source tab however how they do so isn't clear to me from the PostgreSQL tables.

      Datasources with no connected workbooks.jpg

      In additional I was also trying to understand if the data source is a Server DS or if it is embedded in a workbook, I attempted to write a query for this (attached) with the only identifiers I could discern and for the most part it checks out.


      I really appreciate any help that you guys can offer!!