Reputation: 3596
I am getting a query response from Azure Log Analytics
result = log_client.query(myWorkSpaceId, QueryBody(**{'query': 'Heartbeat| limit 50'}))
print (result)
'additional_properties': {}, 'tables': [<azure.loganalytics.models.table_py3.Table object at 0x11011b090>]}
This object contains the tables, columns & rows resulting from a query. But how I can get these tables, how do I find names ?
Upvotes: 0
Views: 505
Reputation: 42043
You could refer to the samples below.
1.Print the tables.
print(result.tables)
2.Print the first table.
print(result.tables[0])
3.Print the name of the first table.
print(result.tables[0].name)
4.Print the first column of the first table.
print(result.tables[0].columns[0])
5.Print the first row of the first table.
print(result.tables[0].rows[0])
Upvotes: 1