cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Get managedResourceGroup from serverless

carlos_tasayco
New Contributor III

Hello,

In my job I have a task where I should modify a notebook to get dynamically the environment, for example:

This is how we get it:

dic = {"D":"dev", "Q":"qa", "P":"prod"}
managedResourceGroup = spark.conf.get("spark.databricks.xxxxx")
xxxxx_Index = managedResourceGroup.find('XXXX')
environment = managedResourceGroup[xxxxx_Index+6:(xxxx_Index+7)]

Basically with that workaround I get the environment, but in a serverless notebook I cannot, I checked with the Assistant but his solution is not very good for me since I have to get access to the rest api. 
 
Do you know how can I do it? I think like to get access to the groups (groups name has the environment inside) but again ask me to put the rest api first.
 
Thanks in advance for your help..
0 REPLIES 0

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now