# cfxdm - dm:head

**dm:head:** This cfxdm tag allows the user to fetch top 'n' rows from the queried data.

**dm:head** synta&#x78;**:**&#x20;

* **n (optional)**. Specify number of top rows that need to be listed. When this argument is not specified, by default it retrieves top 10 rows.

{% hint style="info" %}
For predictable results, use it along with **dm:sort** tag.
{% endhint %}

In the below example, for a reference, we are going to use **VMware vROps** as an extension to query the data and ingest it into **dm:head** tag to list top 'n' rows.

Enter the below command to select **VMware vROps Datastore Summary tag (\*vrops:datastore\_summary**). (In this example, vrops name is used as a label to identify VMware vROps extension and it's tags. The label is defined while adding the extension in cfxdx configuration file or through UI)

```
tag *vrops:datastore_summary
```

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MVdeYcgylnhey0GcBbm%2F-MVdqUxBzyGEMfB4Lc_y%2FScreen%20Shot%202021-03-12%20at%208.30.29%20PM.png?alt=media\&token=265449c6-4b98-4e4a-90c0-a4d6c09a2132)

**Example 1:** List top 10 rows

Get the data from VMware vROps Datastore Summary tag (**\*vrops:datastore\_summary**) and list top 10 rows.

```
data --> dm:head
```

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MVdeYcgylnhey0GcBbm%2F-MVdpiGhE65ZwRkey-6z%2FScreen%20Shot%202021-03-12%20at%208.27.21%20PM.png?alt=media\&token=54de4a33-f095-4b00-9cee-156ba3a651bc)

**Example 2:** List top 20 rows

Get the data from VMware vROps Datastore Summary tag (**\*vrops:datastore\_summary**) and list top 20 rows.

```
data --> dm:head n = 20
```

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MVdr63_ufd2A-nLz0lG%2F-MVdrsKvpWc-qDa4mqY_%2FScreen%20Shot%202021-03-12%20at%208.36.39%20PM.png?alt=media\&token=2791ce6c-a17a-45ab-8821-f287753d8ef5)

**Example 3:** Sort the datastore by name (in ascending order) and List top 20 rows

Get the data from VMware vROps Datastore Summary tag (**\*vrops:datastore\_summary**), sort the data by datastore column 'name' and list top 20 rows.

```
data --> dm:sort columns = 'name' --> dm:head n = 20
```

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MVdrxVeiPMOWrhTd4m5%2F-MVdtEVRQ-E6nMH_M4nM%2FScreen%20Shot%202021-03-12%20at%208.42.41%20PM.png?alt=media\&token=43fd8df5-5e72-4959-a7a9-78a3d4df9d7f)
