Run and Schedule Notebooks
Choose a run method based on whether you need to explore a single cell or reproduce the entire analysis.
| Control | Use it to |
|---|---|
| Run on a cell | Explore in the interactive session. Earlier cells in the session can supply variables to later cells. |
| Run all | Save the notebook and run every executable cell from top to bottom in a fresh kernel. |
| Run inputs | Supply different values for a single run while keeping the saved defaults. |
| Runs | Inspect the status, error, and outputs for completed or failed runs. |
| Sessions | See live interactive kernels and stop a session that is holding a slot. |
Make a notebook repeatable
- Keep imports, data loading, and common variables near the top. Use qualified table names so the intended source is clear.
- Add a Parameters cell for values that change between runs, such as a reporting period or region. Choose the appropriate type and save defaults that work against your intended source.
- Use Run all and check the output of the last cell. Compare its row count or totals with a known result before relying on the notebook.
- Use Run inputs to test different parameter values. Find that run in Runs and inspect the new output independently of the interactive session.
Schedule a saved notebook
When scheduling is enabled for your workspace, save the notebook and open Schedule. Select the cadence, time zone, and parameter values. Studio records a snapshot of the cells and inputs for the scheduled runs. After changing the notebook, save the schedule again to use the updated snapshot.
Use All schedules in the notebook sidebar to find schedules across notebooks. Check the notebook’s Runs after the first scheduled occurrence. The run needs an enabled runner and an execution identity authorized to read each source and write any configured output. Table access can differ between the scheduled run and an interactive session.
Troubleshoot a run
- A variable is missing after a restart. Rerun setup cells or use Run all to execute the notebook in order.
- A kernel is waiting for a slot. Open Sessions to check active kernels. Stop an idle session when you no longer need its in-memory variables. Ask a workspace admin about limits if you regularly need more slots.
- SQL is waiting for a warehouse. Check the named warehouse's status. A warehouse can be starting even when the notebook kernel is ready.
- A run failed or produced incomplete output. Open Runs, read the first error, and record the run ID and affected cell if you need help. Check the connection, source access, installed packages, and any changes to upstream data.
Use Administration and troubleshooting for workspace access, usage, and compute checks.