take 运算符take operator

最多返回指定数量的行。Return up to the specified number of rows.

T | take 5

除非对源数据进行排序,否则无法保证返回哪些记录。There is no guarantee which records are returned, unless the source data is sorted.


take 是一种在以交互方式浏览数据时查看小样本记录的简单、快速且高效的方法,但请注意,即使数据集没有变化,在多次执行时,也不能保证其结果的一致性。take is a simple, quick, and efficient way to view a small sample of records when browsing data interactively, but be aware that it doesn't guarantee any consistency in its results when executing multiple times, even if the data set hasn't changed. 即使查询返回的行数不由查询显式限制(未使用 take 运算符),Kusto 也会默认限制该数字。Even if the number of rows returned by the query isn't explicitly limited by the query (no take operator is used), Kusto limits that number by default. 如需更多详细信息,请参阅 Kusto 查询限制For more details, see Kusto query limits.


take NumberOfRows limit NumberOfRowstake NumberOfRows limit NumberOfRows

takelimit 是同义词。)(take and limit are synonyms.)

Kusto 是否支持对查询结果进行分页?Does Kusto support paging of query results?

Kusto 不提供内置分页机制。Kusto doesn't provide a built-in paging mechanism.

Kusto 是一种复杂的服务,它可不断优化其存储的数据,以便提供针对大型数据集的极佳的查询性能。Kusto is a complex service that continuously optimizes the data it stores to provide excellent query performance over huge data sets. 尽管分页对于资源有限的无状态客户端是一种有用的机制,但它是将负担转移到必须跟踪客户端状态信息的后端服务。While paging is a useful mechanism for stateless clients with limited resources, it shifts the burden to the backend service which has to track client state information. 因此,后端服务的性能和可伸缩性受到严重限制。Subsequently, the performance and scalability of the backend service is severely limited.

对于分页支持,请实现以下功能之一:For paging support implement one of the following features:

  • 将查询结果导出到外部存储,并以分页方式列出生成的数据。Exporting the result of a query to an external storage and paging through the generated data.

  • 编写中间层应用程序,该应用程序通过缓存 Kusto 查询的结果提供有状态分页 API。Writing a middle-tier application that provides a stateful paging API by caching the results of a Kusto query.

请参阅See also