cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How can I programmatically get my notebook default language?

NLearn
New Contributor II

I'm writing some code to perform regression testing which require notebook path and its default language. Based on default language it will perform further analysis. So how can I programmatically get my notebook default language and save in some variable.

 
1 REPLY 1

jose_gonzalez
Moderator
Moderator

You can get the default language of a notebook using dbutils.notebook.get_notebook_language() 

try this example:

%python
import dbutils
default_language = dbutils.notebook.get_notebook_language()
print(default_language)

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.