Rediger

Del via


take operator

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Return up to the specified number of rows.

There is no guarantee which records are returned, unless the source data is sorted. If the data is sorted, then the top values will be returned.

The take and limit operators are equivalent

Note

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 dataset hasn't changed. 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. For more details, see Kusto query limits.

Syntax

take NumberOfRows

Learn more about syntax conventions.

Parameters

Name Type Required Description
NumberOfRows int ✔️ The number of rows to return.

Paging of query results

Methods for implementing paging include:

  • Export the result of a query to an external storage and paging through the generated data.
  • Write a middle-tier application that provides a stateful paging API by caching the results of a Kusto query.
  • Use pagination in Stored query results

Example

StormEvents | take 5