Get managedResourceGroup from serverless
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2025 07:28 AM
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.
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

