head
Description
Returns the first N results of a query. Defaults to 10.
Syntax
head [ <N> | limit=<int>]
Optional Arguments
| Parameter | Syntax | Default | Description |
|---|---|---|---|
N | <int> | 10 | Number of results to return. |
limit | limit = <int> | Number of results to return. |
Examples
These examples demonstrate various ways to use the head command by default and with explicit row count limitations.
Example 1
When called without arguments, the head command returns the first 10 results.
source tweets8
| head
Example 2
In this example, the number of returned rows is explicitly specified — the first 5 events from the query result.
source tweets8
| head 5
Example 3
This example demonstrates using the named parameter limit to specify the number of returned rows.
source tweets8
| head limit = 7