Files written by Iceberg writers contain Iceberg field IDs that are used for column projection. Iceberg doesn't currently support tracking data files that were written by other systems and added to Iceberg tables with the API because the field IDs are missing. To support files written by non-Iceberg writers, Iceberg could support a table-level mapping from a source schema to Iceberg IDs.
For example, a table with 2 columns might have an Avro schema mapping like this one, encoded as JSON in table properties:
When reading an Avro file, the read schema would be produced using the file's schema and the field IDs from the mapping. The names in each field mapping is a list to handle aliasing.
Files written by Iceberg writers contain Iceberg field IDs that are used for column projection. Iceberg doesn't currently support tracking data files that were written by other systems and added to Iceberg tables with the API because the field IDs are missing. To support files written by non-Iceberg writers, Iceberg could support a table-level mapping from a source schema to Iceberg IDs.
For example, a table with 2 columns might have an Avro schema mapping like this one, encoded as JSON in table properties:
When reading an Avro file, the read schema would be produced using the file's schema and the field IDs from the mapping. The
names
in each field mapping is a list to handle aliasing.