Serverless jobs make it easy to run production notebook workloads at scale, but until now, the state of a run was gone once it ended. If a pipeline ran for hours and failed on the last step, the variables, DataFrames, and other intermediate state you needed to investigate were no longer available. Debugging meant rerunning the upstream work, and waiting just to recreate the context of the original run.
With session restore for serverless jobs, Databricks preserves the Python and Spark state from an eligible run and lets you reopen it in an interactive notebook. Instead of reproducing the run, you can continue from where it ended: inspect variables and DataFrames, debug a failure, or explore results that were never written to a table, without rerunning the job.
When a run is eligible, the job run page surfaces an action to bring that run into an interactive notebook. For a failed run, choose Debug in new notebook to land directly at the point of failure. For a successful run, choose Clone into new notebook to keep exploring from where the run left off. Either way, Databricks creates a new notebook, an independent copy that never touches your production notebook or job, attaches it to serverless compute, and restores the run's state, typically in seconds.
Traditionally, reopening a job's work meant re-running every setup cell: imports, class definitions, UDFs, temp views, and Spark configs, and then re-executing the expensive steps to rebuild the data. With session restore, Databricks reinstates the run's working environment, including:
Session restore also gives Genie Code a much better starting point for debugging. When a serverless job fails, Genie Code can investigate from the state the run left behind rather than trying to reconstruct what happened from the code alone. You can ask it to trace the failure, inspect intermediate results, and test a fix in the cloned notebook, then bring the change back to your job when you're ready.
Serverless jobs tear down their compute as soon as a run completes. Session restore captures the run's state just before that teardown, then reconstructs it on demand.
The result: the run's full environment is reconstructed in a fresh notebook, and you pick up right where it ended.
Session restore is available for notebook tasks running on serverless compute (environment version 5 or higher). State is captured automatically when a run:
A few things to keep in mind:
We're actively exploring how to make session restore even more useful:
Session restore for serverless jobs is available in Public Preview. Workspace admins can enable it from the Previews page, and eligible serverless job runs will begin capturing state automatically. To learn more, see the scheduled notebook jobs documentation: https://docs.databricks.com/aws/en/notebooks/schedule-notebook-jobs#session-restore-for-serverless-j...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.