
Data partitioning
Selecttreat the entire input as a single partition to limit the output of the entire input. Select partition data by fields to limit the output per group of records in the input with identical values in selected fields.
Data order
Selectdon't sort input data if you’d like to output arbitrarily selected records per partition. Select sort partition by fields to select fields to sort each partition by and the direction (ascending or descending).
Null values sort lowest: first in ascending order, last in descending order. So with an ascending sort and a limit of 1, a record whose sort field is null is kept ahead of the record with the lowest real value. To prefer records that have a value, see Null values in Order by fields.
Rows with empty key
When you partition data by fields, choose what happens to rows whose partition key is empty. A key is empty when any partition field is null, or is blank after trimming spaces.
When you partition data by fields you can also turn on Prefer the most complete row. Each partition is then ordered first by how many of the chosen fields are filled; see Keep the most complete row.
Limit data
Finally, select the number of output records per partition.