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

   ### Apache Airflow version
   
   3.1.1
   
   ### If "Other Airflow 2/3 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   When following this 
[guide](https://airflow.apache.org/docs/apache-airflow/stable/howto/custom-operator.html#:~:text=with%20task_id_1.-,The,-parameter%20can%20also),
 the `Rendered Templates` tab doesn't show one item per dictionary key, it 
shows the whole dictionary instead.
   
   DAG Code:
   ```python
   from airflow import DAG
   from datetime import datetime
   
   from typing import Sequence
   
   from airflow.models import BaseOperator
   
   
   class MyConfigOperator(BaseOperator):
       template_fields: Sequence[str] = ("configuration",)
       template_fields_renderers = {
           "configuration": "json",
           "configuration.query.sql": "sql",
       }
   
       def __init__(self, configuration: dict, **kwargs) -> None:
           super().__init__(**kwargs)
           self.configuration = configuration
   
       def execute(self, context):
           pass
   
   with DAG(dag_id="test_rtif", start_date=datetime(2024, 1, 1), schedule=None) 
as dag:
       config_task = MyConfigOperator(
           task_id="task_id_1",
           configuration={"query": {"job_id": "123", "sql": "select * from 
my_table"}},
       )
   ```
   Airflow 2:
   
   <img width="1694" height="516" alt="Image" 
src="https://github.com/user-attachments/assets/48773d40-abf8-4739-8dea-d99514343d5c";
 />
   
   Airflow 3:
   
   <img width="1618" height="435" alt="Image" 
src="https://github.com/user-attachments/assets/4682b5b1-c2a3-4b30-ac36-1068f4ba72a2";
 />
   
   
   ### What you think should happen instead?
   
   Each dictionary key should be independently rendered in the `Rendered 
Templates` view
   
   ### How to reproduce
   
   already specified in description
   
   ### Operating System
   
   Airflow in k8s
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### 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