phi-friday commented on issue #41019:
URL: https://github.com/apache/airflow/issues/41019#issuecomment-2249662622

   I've noticed that 
   if I pass a serialized value as a `json` string instead of a `python` 
object, 
   I can get the default value.
   
   Does the default value for `airflow.Param` only accept `json` strings?
   
   ![스크린샷 2024-07-25 오후 4 37 
55](https://github.com/user-attachments/assets/ce51a4b1-6011-4eb2-88ae-2da7b92a0ea3)
   
   
   ```python
   ➜  dags cat render_test.py
   from __future__ import annotations
   
   from airflow.decorators import dag
   from airflow.models.param import Param
   from airflow.operators.empty import EmptyOperator
   from pendulum import datetime
   
   
   @dag(
       start_date=datetime(2024, 1, 1),
       schedule=None,
       catchup=False,
       params={
           "has_default_list": Param(
               default="[]", items={"type": "string"}, title="Has default 
list", type="array"
           )
       },
   )
   def render_test() -> None:
       EmptyOperator(task_id="empty_task")
   
   
   render_test()
   ```


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