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)

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group