Have you tried the below
- Pause or Stop the DLT Pipeline
- Prevent new writes while moving the table.
2.Move the Table in Metastore
DLT uses Delta tables under the hood, so you can move the table in the metastore without copying data:
ALTER TABLE schemaA.tableX
SET LOCATION 'abfss://container@storage/path/...tableX';
ALTER TABLE schemaA.tableX
RENAME TO schemaB.tableX;
SET LOCATION points to the existing Delta storage location for the new schema.
3. Update the DLT Pipeline
Edit the DLT pipeline code (or the pipeline notebook) to point to the new fully qualified table name @Dlt.table(
name="schemaB.tableX", # updated schema
comment="Moved from schemaA"
)
def tableX():
return dlt.read("schemaB.tableX")
4. Resume the DLT Pipeline
Start the pipeline
5. Verify
SELECT COUNT(*) FROM schemaB.tableX;
Let me know here if the above is effective