Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 1.47 KB

head.rst

File metadata and controls

63 lines (47 loc) · 1.47 KB

head

Table of contents

The head command returns the first N number of specified results in search order.

head [N]

  • N: optional. number of results to return. Default: 10

The example show first 10 results from accounts index.

PPL query:

od> source=accounts | fields firstname, age | head;
fetched rows / total rows = 10/10
+---------------+-----------+
| firstname     | age       |
|---------------+-----------|
| Amber         | 32        |
| Hattie        | 36        |
| Nanette       | 28        |
| Dale          | 33        |
| Elinor        | 36        |
| Virginia      | 39        |
| Dillard       | 34        |
| Mcgee         | 39        |
| Aurelia       | 37        |
| Fulton        | 23        |
+---------------+-----------+

The example show first N results from accounts index.

PPL query:

od> source=accounts | fields firstname, age | head 3;
fetched rows / total rows = 3/3
+---------------+-----------+
| firstname     | age       |
|---------------+-----------|
| Amber         | 32        |
| Hattie        | 36        |
| Nanette       | 28        |
+---------------+-----------+