Are you using cluster init script or global init script ?
DB_CLUSTER_ID - This env variable is available only during the cluster init script execution. I guess you will not be able to get the values for the these init script's env variables if you t...
You can use the cluster node initiaization script to grab the environment variable DB_CLUSTER_ID. Refer here https://docs.databricks.com/user-guide/clusters/init-scripts.html#environment-variables.
Also from the notebook , the following also works ...
I am not sure if these are documented. Use the following code to get the entire list:
%scala
val configMap = spark.conf.getAll
configMap.foreach(println)
You can use the cluster node initiaization script to grab the environment variable DB_CLUSTER_ID. Refer here https://docs.databricks.com/user-guide/clusters/init-scripts.html#environment-variables. Also from the notebook, the following also works :
...