How to get the full path to the current notebook

This article explains how to get full path to the current notebook.


To get the full path in a Scala cell, run the following command in a cell:



To get the full path using Python, you have to get the path and save it into a widget in a Scala cell and read it in a Python cell.

  1. Save the value into a widget from Scala cell.

    dbutils.widgets.text("notebook", dbutils.notebook.getContext().notebookPath.get)
  2. Access the widget value from Python cell.