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:ย 

Can't pass dynamic parameters to non-notebook Python job (spark_python_task)

zed
New Contributor II

I need to access the date of a given job running as a non-notebook Python job (spark_python_task). I want to pass a value from the cli when running it and being available to access the value in the script

I tried the approaches in the attached image when running 

bundle run my_job --params run_date=20240101

 

 

 

 

 

 

 

 

 

1 REPLY 1

Walter_C
Databricks Employee
Databricks Employee

Job parameters are automatically pushed down as key-value parameters to all tasks that accept key-value parameters, which include the following task types:

  • Notebook

  • Python wheel (only when configured with keyword arguments)

  • SQL query, legacy dashboard, or file

  • Run Job

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group