Skip to content

Sort column

Description

The Sort Column activity allows you to sort the rows of a dataset based on one or more selected columns. You can define multiple sorting rules — each specifying the column and the desired order (ascending or descending). This activity is helpful for organizing, prioritizing, or ranking data before presentation or further processing.

Use this activity to:

  • Sort products by rating or price
  • Prioritize entries based on scores or status
  • Prepare reports with consistent ordering

Use case:
After retrieving a list of products with ratings, prices, and discounts, you can sort them first by rating (descending), and then by discount percentage (descending) to find the best deals.

Input

TypeDescription
DataInput table from a previous activity containing columns to be sorted.

Output

TypeDescription
DataSorted dataset based on provided configuration.

Configuration Fields

Field NameDescription
Column MapA list of sorting rules, each defining:
Column – Name of the column to sort by
Sort OrderAscending or Descending

Multiple sort rules are applied in the order defined — the first rule is the primary sort, the second is secondary, and so on.

Sample Input

product_idratingdiscount_percentageprice
B07JW9H4J14.264%₹399
B07AB2CD344.550%₹1,499
B07XY1MN674.570%₹999
B07EF3PL883.955%₹799

Sample Configuration

ColumnSort Order
ratingDescending
discount_percentageDescending

Sample Output

product_idratingdiscount_percentageprice
B07XY1MN674.570%₹999
B07AB2CD344.550%₹1,499
B07JW9H4J14.264%₹399
B07EF3PL883.955%₹799

Rows are sorted first by rating (highest to lowest), and then by discount_percentage in descending order for matching ratings.