The SQL statement to create a table in Delta Live Tables (DLT) is ignored without errors

Create a new DLT pipeline with a new, separate SQL notebook for SQL statements.

Written by Jose Gonzalez

Last published at: June 3rd, 2025

Problem

You’re attempting to add a materialized view to an existing Delta Live Table (DLT) pipeline written in Python. You add an SQL statement to the notebook to create a new table and notice the SQL statement is ignored. 

 

Cause

DLT notebooks can only contain either Python code or SQL statements, but not both. When a notebook contains both, the SQL statement is ignored.

 

Solution

Keep your existing DLT pipeline for your Python notebook, and set up a separate pipeline and notebook for SQL statements.

  1. Create a new DLT pipeline with your SQL notebook.
  2. Move the SQL statement to the new notebook.
  3. Run the new pipeline to create the materialized view.

When you’re done, verify that the new table is created in the expected location and your materialized view is updated correctly.