String search in all Databricks notebook in workspace level

Use case : Is there possibility to check all notebooks from one particular Databricks workspace and get an inventory of where notebooks are directly accessing data through ADLS locations rather than through the metastore.

Information to capture:

Notebook names where “abfss://” is referenced

The specific file path(s) referenced in each notebook

Please help me on this if possible.


Solution 1:

This functionality isn't available on Azure Databricks - you can search by notebook or folder names only. But you can still do what you want by exporting notebooks to local disk & search for the string. For exporting you can use Databricks CLI's workspace export_dir command, like this:

databricks workspace export_dir '/Shared/' ~/tmp/databricks-files