From 86dabba2f8a69fd4557ff580c679ddd11ae89afd Mon Sep 17 00:00:00 2001 From: Monica Gupta Date: Thu, 17 Sep 2020 17:00:26 -0700 Subject: [PATCH] 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 --- src/Microsoft.Kusto.ServiceLayer/Scripting/Scripter.cs | 2 +- .../Scripting/ScripterTests.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Kusto.ServiceLayer/Scripting/Scripter.cs b/src/Microsoft.Kusto.ServiceLayer/Scripting/Scripter.cs index 54922722..7339512a 100644 --- a/src/Microsoft.Kusto.ServiceLayer/Scripting/Scripter.cs +++ b/src/Microsoft.Kusto.ServiceLayer/Scripting/Scripter.cs @@ -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(); } diff --git a/test/Microsoft.Kusto.ServiceLayer.UnitTests/Scripting/ScripterTests.cs b/test/Microsoft.Kusto.ServiceLayer.UnitTests/Scripting/ScripterTests.cs index 144a99bc..e83e42eb 100644 --- a/test/Microsoft.Kusto.ServiceLayer.UnitTests/Scripting/ScripterTests.cs +++ b/test/Microsoft.Kusto.ServiceLayer.UnitTests/Scripting/ScripterTests.cs @@ -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]