shahar1 opened a new pull request, #70373:
URL: https://github.com/apache/airflow/pull/70373

   Follow-up to #70348.
   
   `sql` is a deprecated alias for `cypher`. It used to be folded into `cypher` 
in the constructor, so it went through the normal template-field machinery: the 
resolved query appeared in the **Rendered Templates** view (with the `sql` 
renderer) and `op.cypher` held it.
   
   It is now kept as a separate attribute that is *not* declared a template 
field, and is rendered by an ad-hoc `self.render_template(self.sql, context)` 
inside `execute()`. So for anyone still on `sql=`:
   
   - Rendered Templates shows `cypher: None` while a different query actually 
runs — the executed query is no longer visible anywhere but the task log.
   - The query is rendered outside the standard pipeline (no RTIF, no 
`template_fields_renderers`).
   
   Declaring `sql` a template field lets the framework render it like every 
other field and drops the manual call.
   
   The deprecation warning moves to `execute()` as a consequence: reading a 
template field in `__init__` is exactly what `validate_operators_init` now 
forbids, and the constructor would only see the un-rendered expression anyway. 
The warning still fires once per task run, and both `ValueError`s are unchanged.
   
   related: #70296
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


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