Coalesce Columns in Parquet Files Online
Fill null values in Parquet files from other columns — return the first non-null value across up to 8 columns in priority order. Add the result as a new column. Runs entirely in your browser.
How to coalesce Columns in Parquet files
- Drop your file onto the upload area. The first two columns are placed in slots 1 and 2 as a starting point, and the first 200 rows are shown.
- Set the columns in priority order. Slot 1 is checked first, then slot 2, and so on. Use "+ Add column" for up to 8 columns, or the cross to remove one.
- Name the output column. The default is "coalesced".
- Click Coalesce Columns. The new column is added at the end and every original column is kept.
- Check the preview and download the file 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 sports club membership list has three phone columns filled in unevenly. The coach needs one phone number per member for a text alert, preferring mobile, then work, then home.
Input (Parquet)
Parquet file (binary, columnar) — shown as a table with its schema
| member_id | mobile | work_phone | home_phone |
|---|---|---|---|
| M-01 | 021 555 0142 | NULL | 09 555 7710 |
| M-02 | NULL | 04 555 3301 | 04 555 9120 |
| M-03 | NULL | NULL | 03 555 6604 |
| M-04 | NULL | NULL | NULL |
Schema: member_id VARCHAR, mobile VARCHAR, work_phone VARCHAR, home_phone VARCHAR
Settings
- Columns (in priority order): 1. mobile, 2. work_phone, 3. home_phone
- Output column name: contact_phone
Result
| member_id | mobile | work_phone | home_phone | contact_phone |
|---|---|---|---|---|
| M-01 | 021 555 0142 | NULL | 09 555 7710 | 021 555 0142 |
| M-02 | NULL | 04 555 3301 | 04 555 9120 | 04 555 3301 |
| M-03 | NULL | NULL | 03 555 6604 | 03 555 6604 |
| M-04 | NULL | NULL | NULL | NULL |
Each row takes the first phone number that is present, checking mobile, then work_phone, then home_phone. M-01 has a home number too, but mobile wins because it is first. M-02 has no mobile, so the work number is used. M-04 has no numbers at all, so contact_phone is empty. The three source columns are left as they were.
Working with Parquet files
Parquet keeps real NULLs, so coalescing typed columns is predictable. Compatible numeric types are widened: an INT64 column and a DOUBLE column coalesce to DOUBLE, and INT64 with DECIMAL(10,2) gives a decimal. A DATE and a TIMESTAMP coalesce to TIMESTAMP, with midnight added to the dates. Genuinely different types, such as a string and a date, stop with a type error, so cast one side first.
Coalescing is common after joining two sources, for example a customer_email from the CRM and one from billing. Struct and list columns can be coalesced when their structure matches, and the first non-null struct is taken whole, not field by field. The new column is appended at the end of the schema, and all existing columns keep their names and types. The output is a new Parquet file with the extra column. Dictionary encoding and compression in the source do not affect the result, since values are fully decoded when the file loads. Row groups and page sizes in the output are chosen fresh when the file is written, so the file size can differ from the original even before the new column is counted.
Frequently Asked Questions
What type is the coalesced column in a Parquet file?
The common type of the columns you chose. Integers and doubles give a double, integers and decimals give a decimal, and dates with timestamps give a timestamp. Incompatible types raise an error instead of being converted.
Does coalesce merge struct fields one by one?
No. If the first struct column is not NULL, the whole struct is used, even if some of its fields are NULL. Extract the fields to their own columns to coalesce them individually.
How many columns can I coalesce at once?
Between 2 and 8. The button stays disabled until at least two slots have a column picked.
Does coalesce change the original columns?
No. It adds one new column at the end and leaves every original column untouched. Drop the source columns afterwards with Manage Columns if you no longer need them.
Can I put a default value at the end of the chain?
Not in this tool, which only accepts columns. Run Fill Empty Values on the coalesced column afterwards to replace the remaining empty cells with a fixed value such as "unknown".
Related Tools
Fill Empty Values in Parquet Files Online
Fill empty and null values in Parquet files with a custom replacement value, directly in your browser.
Manage Columns in Parquet Files Online
Drop or select specific columns from Parquet files directly in your browser. No upload required.
Validate Parquet Files Online
Validate Parquet file structure in your browser. Check null counts, distinct values, and data types for every column — no upload required.
Coalesce Columns in CSV Files Online
Fill null values in CSV files from other columns — return the first non-null value across up to 8 columns in priority order. Add the result as a new column. Runs entirely in your browser.
Coalesce Columns in Excel Files Online
Fill null values in Excel files from other columns — return the first non-null value across up to 8 columns in priority order. Add the result as a new column. Runs entirely in your browser.
Coalesce Columns in JSON Files Online
Fill null values in JSON files from other columns — return the first non-null value across up to 8 columns in priority order. Add the result as a new column. 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.