in azure-kusto-data/azure/kusto/data/response.py [0:0]
def __init__(self, json_response: dict):
super(KustoResponseDataSetV1, self).__init__(json_response["Tables"])
if self.tables_count <= 2:
self.tables[0].table_kind = WellKnownDataSet.PrimaryResult
self.tables[0].table_id = 0
if self.tables_count == 2:
self.tables[1].table_kind = WellKnownDataSet.QueryProperties
self.tables[1].table_id = 1
else:
toc = self.tables[-1]
toc.table_kind = WellKnownDataSet.TableOfContents
toc.table_id = self.tables_count - 1
for i in range(self.tables_count - 1):
self.tables[i].table_name = toc[i]["Name"]
self.tables[i].table_id = toc[i]["Id"]
self.tables[i].table_kind = self._tables_kinds[toc[i]["Kind"]]