Rename and drop columns with Delta Lake column mapping.
Hi all,
Now databricks started supporting column rename and drop.
Column mapping requires the following Delta protocols:
- Reader version 2 or above.
- Writer version 5 or above.
Blog URL
##Available in Databricks Runtime 10.2 and above.
ALTER TABLE <table_name> RENAME COLUMN old_col_name TO new_col_name
##Available in Databricks Runtime 11.0 and above.
ALTER TABLE table_name DROP COLUMN col_name
ALTER TABLE table_name DROP COLUMNS (col_name_1, col_name_2, ...)
Ajay Kumar Pandey