cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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
Databricks Employee
Databricks Employee

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)

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