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 reliably get the databricks run time version as part of init scripts in aws/azure databricks

venkateshp
New Contributor II

We currently use the script below, but it is not working in some environments.

The environment variable used in the script is not listed in this link Databricks Environment Variables

```bash
#!/bin/bash
echo "Databricks Runtime Version: $DATABRICKS_RUNTIME_VERSION"
```

4 REPLIES 4

szymon_dybczak
Contributor

If environment variable doesn't work for you, then maybe try with REST API or databrick cli?

These init scripts will run on the driver and every worker node. Is there a simpler way to access the Databricks Runtime Version? Using the REST API or Databricks CLI requires tokens, which can be challenging to manage in customer environments when running these commands as part of init scripts

Unfortunately, I know only two above ways + environment variable approch that you've used already ;/
Maybe someone else has better idea.

Kaniz_Fatma
Community Manager
Community Manager

Hi @venkateshp, Thank you for reaching out to our community! We're here to help you.

To ensure we provide you with the best support, could you please take a moment to review the response and choose the one that best answers your question? Your feedback not only helps us assist you better but also benefits other community members who may have similar questions in the future.

If you found the answer helpful, consider giving it a kudo. If the response fully addresses your question, please mark it as the accepted solution. This will help us close the thread and ensure your question is resolved.

We appreciate your participation and are here to assist you further if you need 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