-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Closed
Labels
affected_version:3.1Issues Reported for 3.1Issues Reported for 3.1area:UIRelated to UI/UX. For Frontend Developers.Related to UI/UX. For Frontend Developers.area:corekind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet
Description
Apache Airflow version
3.1.1
If "Other Airflow 2/3 version" selected, which one?
No response
What happened?
When following this guide, the Rendered Templates tab doesn't show one item per dictionary key, it shows the whole dictionary instead.
DAG Code:
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:
Airflow 3:
What you think should happen instead?
Each dictionary key should be independently rendered in the Rendered Templates view. The sql field should be shown as a sepparate entry in the AF3 UI
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
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
affected_version:3.1Issues Reported for 3.1Issues Reported for 3.1area:UIRelated to UI/UX. For Frontend Developers.Related to UI/UX. For Frontend Developers.area:corekind:bugThis is a clearly a bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yetlabel for new issues that we didn't triage yet