Access Fabric OneLake shortcuts in a Spark notebook

For an overview of shortcuts, see OneLake shortcuts.

Access shortcuts as folders in a Spark notebook

Shortcuts appear as folders in OneLake, and Spark can read from them just like any other folder in OneLake.

To access a shortcut as a folder:

  1. From a lakehouse containing shortcuts, select Open notebook and then select New notebook.

    Screenshot showing where to find the Open notebook option on the ribbon.

  2. Select a shortcut and right-click on a file from the shortcut.

  3. In the right-click menu, select Load data and then select Spark.

    Screenshot showing where to find the Load data and Spark option in the right-click menu.

  4. Run the automatically generated code cell.

    Screenshot showing the automatically generated code cell.

Access shortcuts as tables in a Spark notebook

Microsoft Fabric automatically recognizes shortcuts in the Tables section of the lakehouse that have data in the Delta\Parquet format as tables. You can reference these tables directly from a Spark notebook.

To access a shortcut as a table:

  1. From a Lakehouse containing shortcuts, select Open notebook and then select New notebook.

    The same screenshot displayed previously, showing where to find the Open notebook option on the ribbon.

  2. Select the Table view in the notebook.

    Screenshot showing where to select Table view.

  3. Right-click on the table, then select Load data and Spark.

    Screenshot showing the table right-click menu.

  4. Run the automatically generated code cell.

    Screenshot of the automatically generated code cell from Table view.

Access the HTTPS and ABFS paths of a shortcut

You can also access shortcuts through the Azure Blob Filesystem (ABFS) driver or REST endpoint directly. Copy these paths from the lakehouse.

  1. Open a Lakehouse containing shortcuts.

  2. Right-click on a shortcut and select Properties.

    Screenshot showing where to select Properties on the shortcut right-click menu.

  3. Select the copy icon next to the ABFS path or URL in the Properties screen.