cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

I want to consolidate the delta tables historical versions and write to another table in append mode

amitprasad01
New Contributor II

Hi Team, 

I have a table let's say, employee and it has 5 versions .
version 0 and 1 has column A, column B, 
from version 2 column A has been changed to column C and column B to column D. 
I want to ingest version by version without manual intervention. Can you please suggest the best practice here? 

 

4 REPLIES 4

Lakshay
Databricks Employee
Databricks Employee

Hi @amitprasad01 , When you write to a new table, do you want to write the data from column A and column C to one single column A or you want to create two separate columns named A and C?

@Lakshay I want to create everything into latest columns that means column a will become column c and column b will become column D

Manoj43774
New Contributor II

Do you want to ingest column a, column b and column a as c at a same time or you want to ingest version 1 then version 2 and so on??

uday_satapathy
Databricks Employee
Databricks Employee

Have you checked out deltaTable.cloneAtVersion()?

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group