Clone Tables in Fabric Warehouse – Zero Copy Cloning with T-SQL | Microsoft Fabric Tutorial

Clone Tables in Fabric Warehouse – Zero Copy Cloning with T-SQL | Microsoft Fabric Tutorial

Clone Tables in Fabric Warehouse – Zero Copy Cloning with T-SQL

In this tutorial, we’ll walk through how to use zero-copy table cloning in Microsoft Fabric Warehouse using simple T-SQL commands. Cloning tables is useful for development, testing, historical reporting, or machine learning experimentation—all without duplicating data.

🧠 What is a Zero-Copy Clone?

  • Creates a new table referencing the same data files (Parquet in OneLake)
  • No physical data duplication
  • Cloned tables behave as independent tables
  • Extremely fast and storage-efficient

✅ Syntax to Clone a Table

Clone Current State

CREATE TABLE dbo.Sales_Clone AS CLONE OF dbo.Sales;

Clone Table as of Specific Time

CREATE TABLE dbo.Sales_Clone_History 
AS CLONE OF dbo.Sales 
WITH ( SNAPSHOT_TIME = '2025-05-20T10:00:00Z' );

🛠️ Use Cases for Cloning

  • 🔧 Development and Testing
  • 📊 Point-in-time Historical Reporting
  • 🔁 Recovery and troubleshooting
  • 📂 Data Archiving for compliance
  • 🤖 Reproducible ML Training Pipelines

⚠️ Limitations to Keep in Mind

  • Cloning is limited to tables within the same warehouse
  • Cannot clone tables from Lakehouse SQL endpoints
  • Cloning entire schema or warehouse is not supported
  • Time-travel cloning must be within 30-day retention
  • Schema changes in the source table may block time-based clones
Tip: Clones are disposable. Deleting a clone does not impact the original table.

🎬 Watch the Full Tutorial

Blog post written with the help of ChatGPT.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.