# Sort Columns

In this document, you will explore how to sort columns in Astera Dataprep.  &#x20;

1. To sort columns in Astera Dataprep, click on the *Layout* option in the toolbar and select the *Sort Columns* option from the drop-down. &#x20;

![](/files/0VQfiMdhRVujJSS554SS)

2. Once selected, the *Recipe Configuration – Sort Columns* panel will open.&#x20;

![](/files/UKvvIfAXFVVJRTOo8aTy)

3. In this panel:

* Optional checkboxes allow you to customize the sort behavior:
  * **Treat Null as the Lowest Value:** Places null values at the beginning of the sort.
  * **Case Sensitive**: Enables case-sensitive sorting.
  * **Return distinct values only**: Returns only unique rows in the sorted output.
* Use the *Field* drop-down to select the column you want to sort.
* The *Sort Order* options include:
  * **Ascending:** Sorts the column from A to Z or smallest to largest.
  * **Descending:** Sorts the column from Z to A or largest to smallest.

4. Click *Apply* ![](/files/5Xkx0OFBXjAm92AwKmm8) to sort the dataset. The Grid will now reflect the specified sort order. For example, sorting the *StoreName* column in ascending order. &#x20;

![](/files/n10viwvPtbiUDkdWYWBx)

5. Alternatively, you can sort a column directly in the Grid by right-clicking on the column header and selecting *Sort Columns* from the menu. This opens the *Recipe Configuration panel* with the selected column pre-filled. Adjust the settings if needed and click *Apply* ![](/files/IYSOb99NQFijZlqNzGGq) to confirm.

![](/files/IT9KWcI2pzRVRGHpJEam)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.astera.com/dataprep/layout/sort-columns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
