uc_catalogs = [row.catalog for row in spark.sql("SHOW CATALOGS").collect()]
default_uc_catalogs = uc_catalogs[:100]
dbutils.widgets.dropdown(
"uc_catalog_name",
defaultValue="",
choices=default_uc_catalogs + [""],
label="#2 Select UC Catalog",
)
The widget breaks when there are than 1024 items. In cases where there are > 1024 schemas/catalogs this widget breaks. Should use text field instead