docs.databricks.com
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2023 03:30 AM
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.
##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
Labels: