cancel
Showing results for 
Search instead for 
Did you mean: 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results for 
Search instead for 
Did you mean: 

Blue/Green Deployment, Table Cloning, and Delta live table pipelines

6502
New Contributor III

this a rather complex question that addresses Databricks users only. Let me recap a bit of the context that produced it. In the attempt to adopt the Blue/Green deployment protocol, we found good applications of the table cloning capabilities offered by Databricks. At every new deployment interaction, we clone the existing table into the new system while keeping the old one running. After the new system has been validated, we update the views so that anything works with no interruption. Well, but how do we "clone" the tables used in DLT pipelines? Any help or suggestion is appreciated!

1 REPLY 1

Kaniz_Fatma
Community Manager
Community Manager

Hi @6502To clone tables used in Databricks Delta Lake (DLT) pipelines, you can utilize Delta Lake's versioning and time travel features.

Here are the steps you can follow:

1. First, identify the version of the table you want to clone. This could be the latest version or a specific version your pipeline uses.

2. Use the Delta Lake's CLONE command to clone the table. The syntax is as follows:

python
CLONE source_table [VERSION AS OF version | TIMESTAMP AS OF timestamp] AS destination_table

Where:
source_table Is the name of the table you want to clone?
version Is the version number of the table you want to clone?
timestamp It is the timestamp of the table version you want to clone.
destination_table This is the name of the new table.

Please note that the CLONE the command is not directly supported in Databricks. However, you can achieve similar functionality by using Delta Lake's time travel feature to read a specific table version and then write it to a new table.

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