I have a table in databricks with fields name: string, id: string, orgId: bigint, metadata: struct, now i want to rename one of the columns and change it type. In my case I want to update orgId to orgIds and change its type to map<string, string>
One approach I can think of is, add a new column to the table and write script to migrate the data from one column to the other. But there is no way to drop a column.
So I will have to create a new table altogether and do the data migration and then delete the old table.
Is there a better approach?