Let's say I have a KQL query that uses several tables to retrieve the data. I need to write some code in C#, that will take all the tables used by a given KQL query, and put all those table names into a list.
Simply put: I need to analyze each KQL query to know from which tables it gets the data.
I already tried doing so by writing this code:
var query = "Table1 | project a ,b,c";
var code = KustoCode.Parse(query);
var parseCode = code.Analyze();
Console.WriteLine(parseCode.ResultType.Display.ToString());
But this doesn't return the tables names, but instead it returns the columns names that this query used, which is not what I want.
If you could help me solve this I would greatly appreciate it!