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 to find Databricks runtime version of the cluster in an init script

brickster_2018
Esteemed Contributor
 
3 REPLIES 3

Mooune_DBU
Valued Contributor

It's set as an environment variable called `DATABRICKS_RUNTIME_VERSION`

In your init scripts, you just need to add a line to display or save the info (see python example below):

import os
print("DATABRICKS_RUNTIME_VERSION:",os.environ.get('DATABRICKS_RUNTIME_VERSION',None))

I used it databricks cluster with custom docker image. it gives that "DATABRICKS_RUNTIME_VERSION: None"

Hugh_Ku
New Contributor II

I've also run into the same issue, customised docker image does not give DATABRICKS_RUNTIME_VERSION as env. I believe there are still many issues in how customised docker image is used in databricks cluster.

Can anyone from databricks help answer it?

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