3
votes

Just looking to create a quick in-memory/temp table for testing out queries. I've seen this done before but I'm having trouble finding any examples from a web search or StackOverflow search. I'm looking for something like this:

let TempTable = table("TestTable",
    Column column1 = [1,2,3],
    Column comumn2 = ["A","B","C"]
    );

Result:

resulting table

I don't need to save the table in any database, just want to use for testing & demonstration purposes.

1

1 Answers

7
votes

you could use the datatable operator: https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/datatableoperator

for example:

let T = datatable(column1:int, column2:string)
[
   1, "A",
   2, "B",
   3, "C",
];
... do something with T ...