getContext() in dbutils.notebook not working in DBR 11.2 10.4 LTS Shared ModeIt's also working in no isolation Mode in DBR 11.2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2022
05:11 AM
- last edited on
03-21-2025
06:14 AM
by
Advika
We are trying to fetch notebook context in our Job logging workflow.
current_context = dbutils.notebook.entry_point.getDbutils().notebook().getContext().toJson()
We were able to access this in DBR 10.4 custom mode but in DBR 10.4 & 11.2 (Shared Mode) we get the attached error.
Has the method to access notebook context change in newer DBR version or it's not available at all ?
- Labels:
-
Community Edition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 08:06 AM
Same issue here. Tested on shared clusters up to the latest DBR version 13.1. All give the same error:
py4j.security.Py4JSecurityException: Method public java.lang.String com.databricks.backend.common.rpc.CommandContext.toJson() is not whitelisted on class class com.databricks.backend.common.rpc.CommandContext
With a Single user cluster there are no issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2023 08:15 AM

