BasPH opened a new issue, #31869: URL: https://github.com/apache/airflow/issues/31869
### Apache Airflow version 2.6.1 ### What happened I'm using `array` Params and sometimes want to provide no values. The Param is configured with `type=["array", "null"]` and a default value (e.g. `["a", "b", "c"]`). I would assume emptying the Param field would set an empty array or null in the generated configuration JSON, but instead Airflow sets the default value. I have to manually modify the generated configuration JSON to submit an empty array. Normal usage:  Clearing the param field sets the default value:  I have to manually modify the generated configuration JSON:  ### What you think should happen instead I expect Airflow to set an empty array or null value when a Param field is left empty (and `null` is set as Param type). ### How to reproduce ```python import datetime from airflow.decorators import dag, task from airflow.exceptions import AirflowSkipException from airflow.models import Param @dag( schedule=None, start_date=datetime.datetime(2023, 1, 1), params={ "demo": Param( default=["a", "b", "c"], type=["array", "null"], ) }, ) def dagrun_conf(): @task def print_params(params=None): if params["demo"]: print(params["demo"]) else: raise AirflowSkipException("Nothing to do here") print_params() dagrun_conf() ``` ### Operating System N/A ### Versions of Apache Airflow Providers _No response_ ### Deployment Astronomer ### 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]
