Skip to main content
1-Visitor
January 22, 2014
Solved

Need a list of ALL Query definitions regardless of authority

  • January 22, 2014
  • 1 reply
  • 9306 views

Need a list of ALL Query definitions regardless of authority, I'm administrator of Integrity.

I need to list all queries on our production system to see who is creating queries.

As we make changes to the work flows or fields I need to ensure I notify those users whose query could be effected by the change.

If there not a CLI that will support this function can a third party SQL query tool be used to extract this information?

    Best answer by matt_giltaji

    Hi all,

    There is a diag CLI command which helps with this a lot. You will need admin rights to be able to run it.

    im diag --diag=viewallobjectsforsession on

    After running this command, you will be able to see every query, report, chart, dashboard, etc even if the user did not explicitly share it with you. This only grants read access, if you need to modify anything (such as share a query belonging to a user that left the company to their replacement) you can copy the old query and modify the copy.

    All of the queries/reports/charts/dashboards will show up in your client UI as well as in the CLI, so to get to the list of query definitions, you'll want to run a different CLI command after the diag (and pipe the output to a file).

    im queries --fields=createdBy,name,queryDefinition

    Unfortunately this is not possible to do from the SQL backend as the query definitions are stored in a column with other query metadata in a binary format and can't really be queried against.

    As an alternate approach if you have only a few fields/types/states that you need to check, you can always look at the "References" tab of the particular admin object in the Admin Client and it will populate a list of everything (admin and regular user) that references that object, including queries, reports, charts, etc. The references view can be a bit slow and is probably not as useful as extracting the query definitions themselves, but it is very useful if you just need a quick way to see everything that could be impacted if you change a particular field or type.

    Hope that helps,

    Matt

    1 reply

    1-Visitor
    January 22, 2014

    Joe is my new best friend. Thank you Joe!!!!

    Hey PTC what do you have for us on this one? I've been a very patient user, but my inability to see users' queries easily in the normal UI is now becoming a barrier to scaling. Please act and thanks.

    1-Visitor
    January 22, 2014

    Hi all,

    There is a diag CLI command which helps with this a lot. You will need admin rights to be able to run it.

    im diag --diag=viewallobjectsforsession on

    After running this command, you will be able to see every query, report, chart, dashboard, etc even if the user did not explicitly share it with you. This only grants read access, if you need to modify anything (such as share a query belonging to a user that left the company to their replacement) you can copy the old query and modify the copy.

    All of the queries/reports/charts/dashboards will show up in your client UI as well as in the CLI, so to get to the list of query definitions, you'll want to run a different CLI command after the diag (and pipe the output to a file).

    im queries --fields=createdBy,name,queryDefinition

    Unfortunately this is not possible to do from the SQL backend as the query definitions are stored in a column with other query metadata in a binary format and can't really be queried against.

    As an alternate approach if you have only a few fields/types/states that you need to check, you can always look at the "References" tab of the particular admin object in the Admin Client and it will populate a list of everything (admin and regular user) that references that object, including queries, reports, charts, etc. The references view can be a bit slow and is probably not as useful as extracting the query definitions themselves, but it is very useful if you just need a quick way to see everything that could be impacted if you change a particular field or type.

    Hope that helps,

    Matt

    jsummers1-VisitorAuthor
    1-Visitor
    January 22, 2014

    The reference tab is only good for ADMIN types not for user created queries