K_Anudeep
Databricks Employee
Databricks Employee

Hello @Akshay_Petkar ,

  • %run can break in Jobs due to path resolution—use relative paths (e.g., %run ./lib/utils) and keep all targets in the same Repo.

  • Don’t rely on widget state. Define widgets only in the entry notebook and pass values explicitly (or switch to dbutils.notebook.run() with arguments={...} for clean, isolated calls).

  • Avoid nested/chained%run and side-effect cells; %run literally inlines code and order matters.

  • The recommended approach for a long term mitgatiation is to move shared code into a package in the Repo and import it instead of %run.

 
 
Anudeep