Skip to content

feat(schema): Add update_schema action to enable table schema updates#2120

Open
tomighita wants to merge 4 commits intoapache:mainfrom
dbt-labs:tomighita/feat-add-fields-table-action
Open

feat(schema): Add update_schema action to enable table schema updates#2120
tomighita wants to merge 4 commits intoapache:mainfrom
dbt-labs:tomighita/feat-add-fields-table-action

Conversation

@tomighita
Copy link

@tomighita tomighita commented Feb 6, 2026

Which issue does this PR close?

What changes are included in this PR?

This PR creates an UpdateSchema which implements the TransactionAction allowing users of the crate to add new fields to or delete fields from an iceberg table by updating the table schema. It also checks that the added fields are either optional or have a default value to avoid data corruption downstream.

Are these changes tested?

  • Unit tests for UpdateSchema.
  • Adds one integration tests which tests that we can add data, update the table and can still read the data, ensuring backwards compatiblity and one integration test for deleting a schema.

@CTTY
Copy link
Collaborator

CTTY commented Feb 6, 2026

I'm not sure if this is the right direction, exposing add_fields alone in transaction layer seems very limiting. Maybe UpdateSchema can help with your use case?

@tomighita
Copy link
Author

tomighita commented Feb 9, 2026

Hi @CTTY, this could be an option, indeed. Do you know if this has any chance to be merged? It seems to have no activity for the past 6 months.
I would not mind implementing it myself using the new tx api, just wanted to make sure this would actually get through if it were in a good shape.

@tomighita tomighita force-pushed the tomighita/feat-add-fields-table-action branch from 9988555 to 10f287a Compare February 10, 2026 12:38
@tomighita tomighita changed the title feat(schema): Add add_fields action to enable table schema updates feat(schema): Add update_schema action to enable table schema updates Feb 10, 2026
@tomighita
Copy link
Author

Updated the PR to add an UpdateSchema instead, based on the Java implementation.
Currently, it does not support all actions but we can build on top of this PR to add them as needed.

This also duplicates the work of #1172, but it updates it to match the new Transaction API.

@tomighita
Copy link
Author

Also closes #697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for adding new fields to an iceberg table

2 participants