Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

SORT

Focus mode
SORT - AWS Glue DataBrew

Sorts the data in one or more columns of a dataset in ascending, descending, or custom order.

Parameters
  • expressions – A string that contains one or more JSON-encoded strings representing sorting expressions.

    • sourceColumn – A string that contains the name of an existing column.

    • ordering – Ordering can be either ASCENDING or DESCENDING.

    • nullsOrdering – Nulls ordering can be either NULLS_TOP or NULLS_BOTTOM to place null or missing values at the beginning or at the bottom of the column.

    • customOrder – A list of strings that defines a custom order for the string sorting. By default, strings are sorted alphabetically.

    • isCustomOrderCaseSensitive – Boolean. The default value is false.

Example

{ "RecipeAction": { "Operation": "SORT", "Parameters": { "expressions": "[{\"sourceColumn\": \"A\", \"ordering\": \"ASCENDING\", \"nullsOrdering\": \"NULLS_TOP\"}]", } } }

Example of custom sort order

In the following example, the customOrder expression string has the format of a list of objects. Each object describes a sorting expression for one column.

[ { "sourceColumn": "A", "ordering": "ASCENDING", "nullsOrdering": "NULLS_TOP", }, { "sourceColumn": "B", "ordering": "DESCENDING", "nullsOrdering": "NULLS_BOTTOM", "customOrder": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], "isCustomOrderCaseSensitive": false, } ]
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.