โ12-21-2022 11:57 AM
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,
โ12-21-2022 08:30 PM
Hi @Mohamad Atiehโ I think UC doesn't not support SHALLOW CLONE yet.
โ12-31-2022 11:54 PM
Thank you for sharing your thinking. I'm for an explanation. Why it's not supported while Deep clone is supported?
โ01-05-2023 09:57 PM
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.โ
โ01-13-2023 02:42 AM
I'm having the same. We use shallow clones in our development cycle, but with UC that's not possible which is a blocker
โ03-22-2023 07:58 AM
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...
โ05-05-2023 02:39 PM
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...
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