Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 10:00 PM
You can use Databricks widgets to create a form-like experience and capture user input dynamically.
dbutils.widgets.text("catalog", "", "Enter Catalog Name")
dbutils.widgets.text("schema", "", "Enter Schema Name")
dbutils.widgets.text("table", "", "Enter Table Name")
catalog = dbutils.widgets.get("catalog")
schema = dbutils.widgets.get("schema")
table = dbutils.widgets.get("table")
query = f"SELECT * FROM {catalog}.{schema}.{table} LIMIT 10"
display(spark.sql(query))