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: 

Not able to create table shallow clone on DBR 15.0

cszczotka
New Contributor III

Hi,

I'm getting below error when I'm trying to create table shallow clone on my DBR 15.0.

[CANNOT_SHALLOW_CLONE_NON_UC_MANAGED_TABLE_AS_SOURCE_OR_TARGET] Shallow clone is only supported for the MANAGED table type. The table xxx_clone is not MANAGED table. SQLSTATE: 0AKUC

In documentation  https://learn.microsoft.com/en-us/azure/databricks/delta/clone-unity-catalog is:

"Shallow clone support for Unity Catalog external table is in Public Preview in Databricks Runtime 14.2 and above."

Is something require to enable this feature on my DBR/Unit Catalog ?

Thanks,
Czeslaw

 

 

3 REPLIES 3

shan_chandra
Esteemed Contributor
Esteemed Contributor

@cszczotka - you can perform shallow clone from an UC external table to an external table (or) from an UC managed table to a managed table. If we try to perform shallow clone from an UC external to a managed table or vice versa. The error is thrown. 

cszczotka
New Contributor III

Hi,

Source table is external table in UC and  result table should be also external. I'm running such command 

CREATE TABLE target_catalog.target_schema.table_clone SHALLOW CLONE source_catalog.source_schema.source_table
 
but this for some reason doesn't work on my databricks.

 

cszczotka
New Contributor III

Hi,

It works if is specified location for table clone:

CREATE TABLE target_catalog.target_schema.table_clone SHALLOW CLONE source_catalog.source_schema.source_table LOCATION 

'abfss://.../table_clone'
 
After running this command I'm able to see table in UC with Type EXTERNAL_SHALLOW_CLONE.
Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!