DBUtils cannot find widgets [Windows 10]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2021 05:08 AM
I use databricks connect to connect PyCharm with databricks cluster remotely but when I try to get dbutils.widget throw an error.
cluster conf:
spark.databricks.service.server.enabled true
spark.databricks.hive.metastore.glueCatalog.enabled true
spark.databricks.service.client.enabled true
spark.hadoop.fs.s3a.acl.default BucketOwnerFullControl
error: AttributeError: 'DBUtils' object has no attribute 'widgets'
code:
from pyspark.sql import SparkSession<br>from pyspark.dbutils import DBUtils<br><br>spark = SparkSession.builder.getOrCreate()<br><br>dbutils = DBUtils(spark)<br>
- Labels:
-
Dbutils
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2021 11:37 PM
This is normal behavior. databricks-connect does not support the whole dbutils class.
https://docs.databricks.com/dev-tools/databricks-connect.html#access-dbutils
Widgets are not on the list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2021 03:39 AM
Thanks!
![](/skins/images/B38AF44D4BD6CE643D2A527BE673CCF6/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/B38AF44D4BD6CE643D2A527BE673CCF6/responsive_peak/images/icon_anonymous_message.png)