cancel
Showing results for 
Search instead for 
Did you mean: 
Data Governance
Join discussions on data governance practices, compliance, and security within the Databricks Community. Exchange strategies and insights to ensure data integrity and regulatory compliance.
cancel
Showing results for 
Search instead for 
Did you mean: 

CREATE TABLE SHALLOW CLONE is not supported in Unity Catalog

mohamad_atieh
New Contributor III

Hi,

I would like to clone the structure (schema only) of delta table without the content using SHALLOW CLONE command, as recommended in databricks documentation, but it doesn't work. I get an error message that this command is not supported in Unity Catalog. However, DEEP CLONE does work well.

Please find below my code and he error message:

CREATE OR REPLACE TABLE facility_silver SHALLOW CLONE facility_bronze;
 
 
Error in SQL statement: AnalysisException: [UC_COMMAND_NOT_SUPPORTED] CREATE TABLE SHALLOW CLONE is not supported in Unity Catalog.;

Anything wrong with my code?

How to clone delta table schema without its content?

Thanks,

6 REPLIES 6

Ajay-Pandey
Esteemed Contributor III

Hi @Mohamad Atieh​ I think UC doesn't not support SHALLOW CLONE yet.

Ajay Kumar Pandey

Thank you for sharing your thinking. I'm for an explanation. Why it's not supported while Deep clone is supported?

I agree. I'd love to know why/when we can get shallow clone back. I WAS running a dbt slim ci setup where on pull request we'd shallow clone the schema and run state:modified+ against the clone, reporting back success/fail to the PR. Can't really do this with UC.​

RicaWage_64393
New Contributor II

I'm having the same. We use shallow clones in our development cycle, but with UC that's not possible which is a blocker

33799
New Contributor II

Can you please let us know if SHALLOW CLONE is on the roadmap for UC?

We use shallow clones to update tables and not affect running workflows...

WAHID
New Contributor II

You can shallow clone the table to an external location after sync the result of the shallow clone to unity catalog.

Here is an example https://medium.com/@wahidatoui/sync-delta-tables-stored-in-dbfs-managed-or-external-to-unity-catalog...

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