Troubleshooting

Troubleshooting: a generated notebook fails on Databricks or Fabric Lakehouse

Use this page when a generated .ipynb fails on Databricks or Fabric Lakehouse. For what the notebook contains, see PySpark notebooks.

CREATE MATERIALIZED VIEW fails

Likely cause: The platform can’t create materialized views where the notebook is attached.

Resolution:

  • Fabric Lakehouse: attach the notebook to a schema-enabled lakehouse.
  • Databricks: run it on a Pro or Serverless SQL warehouse (or compute that supports materialized views in your workspace).

“Schema not found” or “Table or view not found”

Likely cause: The notebook is attached to a different catalog or lakehouse than expected, or the cells ran out of order.

Resolution:

  1. Check the notebook is attached to the right lakehouse (Fabric) or that the right catalog is the default (Databricks).
  2. Run the cells from the top. Object creation creates the schemas and tables that later cells use.
  3. A Load Script notebook assumes the tables exist. Run the Create Objects notebook first.

“Permission denied” on a Delta table

Likely cause: The account running the notebook can’t read the sources or write the destination.

Resolution: Grant read on the source tables and write (for example MODIFY on Databricks) on the destination tables and schema, then run again.

A default value is ignored

Likely cause: Delta applies a column default only to SQL inserts that leave the column out. A DataFrame write doesn’t fill it.

Resolution: Load with SQL INSERT (as the generated functions do) or set the value in your DataFrame.

Nothing happens when I “Run all”

Likely cause: The cells that change data are commented out on purpose. The Drop objects cell and the Run cell are disabled so a “Run all” can’t drop tables or start a full load by accident.

Resolution: To load data, uncomment the call in Run (optional — uncomment to execute), or call the orchestrator or a load function from your own cell.

A load runs but loads zero rows

Likely cause: The arguments don’t match the data, for example watermark_override, batch_id, or snapshot_date.

Resolution:

  • Call the function with debug=True to print progress.
  • Check the argument values against the source data.
  • Check the job log table, if the Pipeline has one, for the function’s status and error message.

A cell fails with no clear error

Likely cause: Earlier cells left the session in an unexpected state.

Resolution: Detach and re-attach (or restart the session), then run the cells in order from the top. If the same cell still fails, copy the full stack trace for your team.

My edits to the notebook disappeared

Likely cause: You regenerated the notebook in Kenseme, which replaces it.

Resolution: Make the change in Kenseme instead (mappings, load strategy options, view bodies) so it survives regeneration. Keep any extra code in a separate notebook that calls the generated one.