Member-only story

Nidhi Gupta
3 min readApr 28, 2024

--

How to Clone Data from one Delta Table Schema to Another Databricks

Recently, while working on a project, I had the opportunity to learn how to back up data or make a copy of data from a table or schema on a Databricks notebook. 😊 In this article, I will guide you through various methods to copy data from tables/schemas on a Databricks notebook.

Method1: Clones:

Clones are replicas of a source table at a given point in time. They have the same metadata as the source table: schema, constraints, column descriptions, statistics, and partitioning. Note, however, that clones have a separate, independent history from the source table. For example, time travel queries on your source table and clone may return different results.

We have two options available to clone the data i.e.; deep clone and shallow clone.

Shallow clone:(also known as zero-copy)

  1. The data files of the table aren’t copied just the metadata is cloned.
  2. This type of clone doesn’t create a physical copy of the data.
  3. Shallow clones are not resource-intensive and can be extremely fast to create. However, these clones are not self-contained and maintain a dependency on the source from which they were cloned.

--

--

Nidhi Gupta
Nidhi Gupta

Written by Nidhi Gupta

Azure Data Engineer 👨‍💻.Heading towards cloud technologies expertise✌️.

Responses (1)