Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2024 05:46 AM
Hi @Wolfoflag ,
Yes, whithin Databricks I was able to shallow clone using runtime 14.0.
Also, outside Databricks, it worked when using the databricks sdk with a SQL Warehouse of version 2023.50 or above.
Example with the sdk:
WORKSPACE_CLIENT.statement_execution.execute_statement(
warehouse_id=sql_warehouse_id, statement=statement
)
Where sql_warehouse_id is the id of your sql warehouse and
your statement could be something like :
f"CREATE OR REPLACE TABLE {target_table_full_name} SHALLOW CLONE {source_table_full_name}"
WORKSPACE_CLIENT is the workspace client from databricks sdk ()
i.e from databricks.sdk import WorkspaceClient