aamster opened a new issue, #28940:
URL: https://github.com/apache/airflow/issues/28940

   ### Apache Airflow version
   
   2.5.0
   
   ### What happened
   
   I have a dag like
   
   ```
   import datetime
   
   from airflow.models import Param
   from airflow.models.dag import dag
   
   
   @dag(
       dag_id="foo",
       schedule=None,
       params={'month': Param()},
       start_date=datetime.datetime.now()
   )
   def foo():
       pass
   
   
   foo()
   
   ```
   
   I am trying to pass this param via CLI. I tried passing it like 
   ```
   airflow dags test foo --conf '{"month": "2022-01"}'
   ```
   
   gives
   ```
   airflow.exceptions.ParamValidationError: Invalid input for param month: No 
value passed and Param has no default value
   ```
   
   This is not answered on doc page 
https://airflow.apache.org/docs/apache-airflow/stable/concepts/params.html
   
   ### What you think should happen instead
   
   `month` should be passed to the dag
   
   ### How to reproduce
   
   _No response_
   
   ### Operating System
   
   mac osx
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to