Change default kusto query to get 10 rows (#1077)

* Query to get 10 rows for Kusto queries

* fix unit tests

* Addressed comments

Co-authored-by: Monica Gupta <mogupt@microsoft.com>
This commit is contained in:
Monica Gupta
2020-09-17 17:00:26 -07:00
committed by GitHub
parent df0be31019
commit 86dabba2f8
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ namespace Microsoft.Kusto.ServiceLayer.Scripting
// TODOKusto: Extract into the Kusto folder.
selectQuery.Append($"{KustoQueryUtils.EscapeName(urn.GetAttribute("Name"))}");
selectQuery.Append($"{KustoQueryUtils.StatementSeparator}");
selectQuery.Append("limit 1000");
selectQuery.Append("take 10");
return selectQuery.ToString();
}

View File

@@ -17,7 +17,7 @@ namespace Microsoft.Kusto.ServiceLayer.UnitTests.Scripting
var scripter = new Scripter();
var result = scripter.SelectFromTableOrView(mockDataSource.Object, urn);
Assert.AreEqual("[@\"quoted'Name\"]\n | limit 1000", result);
Assert.AreEqual("[@\"quoted'Name\"]\n | take 10", result);
}
[Test]