cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

databricks notebook parameter works in interactive mode but not in the job

Dimitry
Contributor III

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.

 

4 REPLIES 4

szymon_dybczak
Esteemed Contributor III

Hi @Dimitry ,

Do you use python or scala in your notebook?

Because there was similar thread where user states that it doesn't work in Scala

InputWidgetNotDefined exception when running a not... - Databricks Community - 45600

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.

Dimitry_0-1761692401086.png

 

Also, the same problem with SQL cells

Dimitry_0-1761705933290.png

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now