How can I return all the data back from the correct amount of rows in this query. I have it as for row in results['results']: print(row)
but I'm sure thats wrong because when I run it in sql it returns more. Thanks in advance!
results = swis.query("SELECT "
"n.Caption AS NodeCaption"
",n.IP_Address AS IPAddress"
",n.NodeID"
",a.ApplicationID "
",n.Uri AS NodeUri "
",n.Uri AS AppUri "
"FROM Orion.Nodes n "
"JOIN Orion.APM.Application a ON n.NodeID = a.NodeID "
"JOIN Orion.APM.ApplicationTemplate at ON a.ApplicationTemplateID = at.ApplicationTemplateID "
"WHERE at.Name IN('Process_Monitor - Dynatrace Linux OneAgent', 'Service_Monitor - Dynatrace"
"OneAgent Service')")
for row in results['results']:
print(row)
Query was structured with too many spaces in between select statement. Rewrote the query and it worked as expected.