cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

Can I automate notebook tagging based on workspace folder structure?

EllaClark
New Contributor II

Hi all,

I’m currently organizing a growing number of notebooks in our Databricks workspace and trying to keep things manageable with proper tagging and metadata. One idea I had was to automatically apply tags to notebooks based on their folder structure — for example, if a notebook is under /Projects/Marketing, it gets a ā€œmarketingā€ tag.

Is there a way to automate this using the REST API or a workspace scanner script? I know there are some workspace management tools, but I haven’t seen much around dynamic tagging.

Thanks in advance for any tips!

2 REPLIES 2

EllaClark
New Contributor II

@EllaClark wrote:

Hi all,

I’m currently organizing a growing number of notebooks in our Databricks workspace and trying to keep things manageable with proper tagging and metadata. One idea I had was to automatically apply tags to notebooks based on their folder structure_for example of a notebook is under /Projects/Marketing, it gets a ā€œmarketingā€ tag.

Is there a way to automate this using the REST API or a workspace scanner script? I know there are some workspace management tools, but I haven’t seen much around dynamic tagging.

Thanks in advance for any tips!

Anyone please...?

Renu_
New Contributor III

Hi @EllaClark

Yes, you can automate tagging of Databricks notebooks based on folder structure using the REST API and a script. Use the Workspace API to list notebook paths, extract folder names, and treat them as tags.

If the API supports metadata updates in your environment, you can apply tags directly. Otherwise, maintain a separate path to tag mapping. You can also schedule this as a Databricks Job to keep tags up to date as your workspace changes.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now