Rank Rows in Parquet Files Online
Add a rank column to Parquet files based on any column's values. Choose RANK, DENSE RANK, or ROW NUMBER, with optional partitioning — runs entirely in your browser.
How to rank Rows in Parquet files
- Drop your file onto the upload area. It is loaded into the in-browser engine and the first 200 rows are shown.
- Choose the Sort by column and a direction: Highest first (the default) or Lowest first.
- Optionally pick a Partition by column so ranking restarts at 1 in each group, and change the output column name from rank if you like.
- Pick a rank method: RANK (gaps after ties: 1, 1, 3), DENSE RANK (no gaps: 1, 1, 2) or ROW NUMBER (always unique: 1, 2, 3). Click Add Rank Column.
- The rank column is added as the first column. Check the preview, then download in the same format you uploaded.
Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.
Worked example
A warehouse tracks how many orders each picker completed on the early and late shifts. The supervisor wants a leaderboard for each shift, and two early-shift pickers finished level.
Input (Parquet)
Parquet file (binary, columnar) — shown as a table with its schema
| picker | shift | orders_picked |
|---|---|---|
| Maya | Early | 14 |
| Tom | Early | 9 |
| Ines | Early | 14 |
| Kofi | Late | 11 |
| Lena | Late | 7 |
| Raj | Late | 12 |
Schema: picker VARCHAR, shift VARCHAR, orders_picked BIGINT
Settings
- Sort by column: orders_picked
- Direction: Highest first
- Partition by: shift
- Rank method: RANK
- Output column name: rank
Result
| rank | picker | shift | orders_picked |
|---|---|---|---|
| 1 | Maya | Early | 14 |
| 1 | Ines | Early | 14 |
| 3 | Tom | Early | 9 |
| 1 | Raj | Late | 12 |
| 2 | Kofi | Late | 11 |
| 3 | Lena | Late | 7 |
Ranking restarts for each shift. Maya and Ines both picked 14, so both are ranked 1, and RANK skips 2, so Tom is 3. With DENSE RANK Tom would be 2. With ROW NUMBER one of the tied pair would get 2, and which one is not fixed. Here the rows came back grouped by shift, but output row order is not guaranteed. Sort afterwards if order matters.
Working with Parquet files
Parquet types decide how values compare. DATE and TIMESTAMP columns rank in time order, so Highest first puts the most recent row at 1. DECIMAL columns compare exactly. DOUBLE columns compare by full binary value, so two amounts that display as 0.3 may not tie if one was computed as 0.1 + 0.2. Round Numbers before ranking if you expect such values to tie.
The rank column is an INT64 and becomes the first field in the output schema. All other columns keep their types, including nested structs, which pass through untouched. You cannot rank or partition by a field inside a struct directly. Flatten it or query it in the SQL Query tool. Rows with a null Partition by value form their own group and are ranked against each other. Output row order is not guaranteed. Rows often come back grouped by the partition column, so sort afterwards if downstream readers expect the original order.
Frequently Asked Questions
Can I rank a Parquet file by a timestamp column?
Yes. Timestamps rank in time order. Choose Lowest first to rank the earliest event 1, or Highest first to rank the latest event 1.
What type is the rank column in the Parquet output?
INT64. It is placed first in the schema, and every other column keeps its original type.
What is the difference between RANK, DENSE RANK and ROW NUMBER?
RANK gives ties the same number and skips the next ones (1, 1, 3). DENSE RANK gives ties the same number with no gap (1, 1, 2). ROW NUMBER gives every row a unique number (1, 2, 3), and the order between tied rows is not fixed.
Can I rank by more than one column, for example to break ties?
No. The tool ranks by one Sort by column, optionally within one Partition by column. For multi-column ordering, use the SQL Query tool with RANK() OVER (ORDER BY a DESC, b ASC).
How do I keep only the top 3 in each group?
Rank with a partition, then use Filter to keep rows where the rank is 3 or less. Top N per Group does both steps in one go.
Related Tools
Get Top N Rows from Parquet Files Online
Extract the top N rows per group from Parquet files directly in your browser. Get the top 5 products per category, highest scores per team, or any ranked subset — no upload required.
Filter Parquet Files Online
Filter rows in Parquet files by column value, directly in your browser. Your data stays on your device.
Sort Parquet Files Online
Sort Parquet files by any column, ascending or descending, directly in your browser.
Rank Rows in CSV Files Online
Add a rank column to CSV files based on any column's values. Choose RANK, DENSE RANK, or ROW NUMBER, with optional partitioning — runs entirely in your browser.
Rank Rows in Excel Files Online
Add a rank column to Excel files based on any column's values. Choose RANK, DENSE RANK, or ROW NUMBER, with optional partitioning — runs entirely in your browser.
Rank Rows in JSON Files Online
Add a rank column to JSON files based on any column's values. Choose RANK, DENSE RANK, or ROW NUMBER, with optional partitioning — runs entirely in your browser.
Parquet Viewer Online
View and inspect Parquet files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert Parquet to CSV Online
Convert Parquet files to CSV format directly in your browser. No upload required — your data never leaves your device.