Channels
delta-social
h2g2-streaming
roapi
delta-oss
dais-2023
random
delta-rs
general
jobs
kafka-delta-ingest
deltalake-questions
events
lakefs
delta-cycling
deltalake-databricks-dbsql
delta-community
azuredatabricks
deltalake-on-aws
delta-sharing
flink-delta-connector
graph-delta-lake
dat
delta-sharing-rs
Powered by
#deltalake-questions
Title
e
Edmondo Porcu
07/25/2023, 9:00 PM
Is there a way in Python to rename a column of a delta lake table without rewriting it all?
r
rtyler
07/25/2023, 9:47 PM
When you're asking "in Python" are you referring to from PySpark, or from the
deltalake
native python package?
e
Edmondo Porcu
07/25/2023, 10:45 PM
I can do both
m
Matthew Powers
07/26/2023, 12:48 PM
@Edmondo Porcu
- yep, this is possible if you enable column mapping mode, see this blog post for more info:
https://delta.io/blog/2022-08-29-delta-lake-drop-column/
e
Edmondo Porcu
07/31/2023, 12:58 AM
@Matthew Powers
what if the table is not registered in a catalog?
m
Matthew Powers
07/31/2023, 7:47 PM
The same ALTER TABLE statement should work
Post