DX Unified Infrastructure Management

 View Only
  • 1.  SDP text object with SQL query

    Posted Apr 27, 2010 11:16 AM

    I'm using this query in SDP to display information in a text object:

     

    Select COUNT(distinct source) from s_qos_data where probe =  'interface_traffic' and origin = 'EMC'

     

    The query works when I test it but when the dashboard is published and you mouse over the text object SDP says it's an invalid query.  Any idea why?

     

    My other question is what do you have to do to get the SQL query to show the result in the text object?



  • 2.  Re: SDP text object with SQL query

    Posted Apr 28, 2010 09:32 AM

    I figured it out.

     

    First just leave the $VAR in the text field to get a VALID query to show up. 

     

    Second, while the query I was using was valid in the SQL query tool and the NIS query test from the data source selector it wouldn't work because SDP adds a Select top 100 * to the front of your query when you publish it.  I found this information in another post on the forums - http://forum.nimsoft.com/t5/General-Development/SDP-Invalid-Query/m-p/2019/highlight/true#M585

    I changed my query to 

     

    Select

     

    Things are working great now. 

    Select

    top 5 * from (Select COUNT (distinct source) AS 'source' from s_qos_data where probe = 'interface_traffic' and origin = 'EMC') interface