https://delta.io logo
k

Ketki Bukkawar

01/29/2023, 3:58 AM
Hi team! Can someone please help me understand how to delete a column from delta lake tables using the Delta Standalone library (without spark) in Java? I am getting below error on trying to update the metadata of a table with old schema having columns (id, name, new_col) to new schema (id, name)
Copy code
Exception in thread "main" java.lang.IllegalStateException: Detected incompatible schema change:
old schema: root
-- id: integer (nullable = true) (metadata ={})
-- name: string (nullable = true) (metadata ={})
-- new_col: string (nullable = true) (metadata ={})


new schema: root
-- id: integer (nullable = true) (metadata ={})
-- name: string (nullable = true) (metadata ={})
Thank you in advance!
1
I was able to resolve this issue by committing the AddFile (with new schema), RemoveFile (with old schema) and updateTableMetadata actions as a part of same transaction
4 Views