Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot fix: dropdown -> text Databricks widgets #5

Merged
merged 3 commits into from
Apr 18, 2024

Conversation

niall-turbitt
Copy link
Collaborator

Fix for this issue: #4

In https://github.com/epec254/rag_code/blob/main/M1_Sample_Code/3_pdf_rag/3_load_pdf_to_vector_index.py :

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

@niall-turbitt niall-turbitt requested a review from epec254 April 14, 2024 17:25
@epec254 epec254 merged commit 998d50d into epec254:main Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants