How to reliably get the databricks run time version as part of init scripts in aws/azure databricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 10:55 PM
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"
```
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 11:42 PM
If environment variable doesn't work for you, then maybe try with REST API or databrick cli?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 12:22 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 12:28 AM
Unfortunately, I know only two above ways + environment variable approch that you've used already ;/
Maybe someone else has better idea.
![](/skins/images/582998B45490C7019731A5B3A872C751/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/582998B45490C7019731A5B3A872C751/responsive_peak/images/icon_anonymous_message.png)