databricks notebook parameter works in interactive mode but not in the job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2025 11:02 PM
Hi guys
I've added a parameter "files_mask " to a notebook, with a default value.
The job running this notebook broke with error: com.databricks.dbutils_v1.InputWidgetNotDefined: No input widget named files_mask is defined
Code: mask = dbutils.widgets.get('files_mask')
The problem is, it works in interactive mode but not in the job. How do I use parameters defined in the notebook as-is, without redefining them in job? I'm happy for them to run on defaults as declared in the notebook.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2025 11:49 PM
Hi @Dimitry ,
Do you use python or scala in your notebook?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2025 12:52 AM
Because there was similar thread where user states that it doesn't work in Scala
InputWidgetNotDefined exception when running a not... - Databricks Community - 45600
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2025 04:01 PM
I'm using Python and run it under a standard compute (not serverless).
I don't have Scala cells in the notebook and it is confusing, as the other thread was about failing in Scala but working in Python.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2025 07:46 PM
Also, the same problem with SQL cells