Forum Discussion
Lakehouse Delta table changes are not reflecting in SQL Analytics Endpoint
If you have already applied column name mapping to your tables, i.e. something like this
ALTER TABLE table_name SET TBLPROPERTIES (
'delta.columnMapping.mode' = 'name',
'delta.minReaderVersion' = '2',
'delta.minWriterVersion' = '5')
then I think you will need to create a new table (or a new lakehouse) and don't use the enable column mapping command. Instead, just use overwriteSchema or mergeSchema if you need to edit the schema of your table. You can also use ALTER TABLE ADD COLUMN, but you cannot use other ALTER TABLE commands like RENAME COLUMN or DROP COLUMN.
Thanks Shreya_Barhate and frithjof_v , I am able to alter column name and data type changes using dataframe in lakehouse rather than ALTER TSQL.
- frithjof_v2 years agoCommunity Champion
When writing the dataframe with changed columns to a Lakehouse table, are you using .option("overwriteSchema", "true") or .option("mergeSchema", "true")? Or have you found another method?
I'm curious about this topic 😃
- Debasish_p2 years agoFrequent Visitor
It's .option("overwriteSchema", "true"). The mergeSchema option will append the renamed column to the end of the schema.