I am setting up a SAM monitor using python and testing the swql query i want to run does not return any results even though when i run the query in swql studio it does.
I also tested another query and it does return result
Anybody able to assist ?
thanks
Query that works:
def EngineIDquery():
results = swis.query("SELECT EngineID FROM Orion.Engines WHERE ServerName=@Sysname", Sysname=system)
print(results)
engineid=(results['results'][0]['EngineID'])
print(engineid)
and this is the print output
{'results': [{'EngineID': 10}]}
10
Output from swql studio

Query that returns blank
def cfgchange():
change = """SELECT Nodes.Displayname FROM Orion.Nodes as Nodes
JOIN NCM.Nodes as n on Nodes.NodeID = n.CoreNodeID
JOIN NCM.ConfigArchive as c on n.NodeID = c.NodeID
WHERE Nodes.Vendor LIKE '%uroam%'
AND c.ConfigType = 'Running'
AND ModifiedTime >=DATETRUNC('HOUR',ADDHOUR(-72,GETUTCDATE()))
"""
result = swis.query(change)
print(result)
table = (result['results'])
print(table)
print outputs are
{'results': []}
[]
Output from swql studio ( i subsituted sensitive data for modified time column)
