# One blank cell, two different questions for the data supplier

A supplier sends you several tables. You combine them and find a blank where you expected the confidence score for a case. Did the supplier leave this one score empty, or did the table for that case arrive without a confidence column at all?

We built two fictional deliveries that called for different answers. Each of the three files supplied one row. Even when we saved the source filename beside each row, the combined tables looked identical. The answer was in a separate list of the columns each source file actually contained.

The files used Parquet, a format for storing tables. We read them with DuckDB, using a setting called `union_by_name`. It lines columns up by name. If one table has a confidence column and another lacks it, DuckDB’s combined table has a confidence cell for each row. The setting fills the gap with a null, the same marker a source table can use when it has a column but no score for a particular row. [How DuckDB combines columns from different files](https://duckdb.org/docs/1.4/data/multiple_files/combining_schemas)

## We swapped the file that lacked the column

In the first delivery, `a.parquet` had a column called `confidence` and a null where the score would go. Open `b.parquet` and there was no confidence column to inspect. In the second delivery those roles were reversed. A third file, `c.parquet`, supplied a score of 80 both times.

The table columns labeled ‘First delivery’ and ‘Second delivery’ describe what arrived in each original file. The last column shows what DuckDB 1.4.4 returned after combining the three files by name.

**Confidence column before and after each merge**

| Source file | First delivery | Second delivery | Value after either merge |
| --- | --- | --- | ---: |
| `a.parquet` | Present with a null value | Column absent | Null |
| `b.parquet` | Column absent | Present with a null value | Null |
| `c.parquet` | Present with the value 80 | Present with the value 80 | 80 |

## The filename survived. The reason for the null didn’t.

In this run, the two saved outputs were identical down to the last byte. Each contained three rows, the three source filenames, two null scores and the value 80. The name `a.parquet` told us which file a row came from in a given delivery. It didn’t tell us which columns that version had. We could answer that from a separate list of the columns in each original file. [How to read the columns recorded in a Parquet file](https://duckdb.org/docs/1.4/data/parquet/metadata)

## Keep the original column lists

Before combining the files, record the column names for each one. Give that list and each merged row an ID pointing to the exact file you checked, such as its full path and a fixed revision. If another delivery uses that same filename next week, you can still tell the supplier what was present in this one.

## Related research

- [Two settings found two cases each. Only one pair belonged in the test.](https://sapien1.com/research/check-parquet-evaluation-deliveries)
- [When folders named 01 and 1 become the same test group](https://sapien1.com/research/check-parquet-partition-types)

[Files and record IDs](https://sapien1.com/research#files)
